lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 Jan 2009 00:12:51 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Davide Libenzi <davidel@...ilserver.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [patch 2/2] epoll remove debugging code

On Tue, 27 Jan 2009 12:54:58 -0800 (PST) Davide Libenzi <davidel@...ilserver.org> wrote:

> static int ep_eventpoll_release(struct inode *inode, struct file *file)
>  {
> -	struct eventpoll *ep = file->private_data;
> -
> -	if (ep)
> -		ep_free(ep);
> +	if (file->private_data)
> +		ep_free((struct eventpoll *) file->private_data);
>  

The old version was better, IMO.

You could just do

	if (file->private_data)
		ep_free(file->private_data);

but personally, I do like to see the purported type mentioned in there
somewhere.  But preferably not in a typecast.

Oh well.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ