Re: [patch 2/2] epoll remove debugging code
From: Andrew Morton
Date: Thu Jan 29 2009 - 03:13:21 EST
On Tue, 27 Jan 2009 12:54:58 -0800 (PST) Davide Libenzi <davidel@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/