[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090129001251.7a39d957.akpm@linux-foundation.org>
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