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]
Message-ID: <Pine.LNX.4.64.0610010900540.21285@alien.or.mcafeemobile.com>
Date:	Sun, 1 Oct 2006 09:04:19 -0700 (PDT)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Jeff Garzik <jeff@...zik.org>
cc:	Andrew Morton <akpm@...l.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fs/eventpoll: error handling micro-cleanup

On Sun, 1 Oct 2006, Jeff Garzik wrote:

> 
> While reviewing the 'may be used uninitialized' bogus gcc warnings,
> I noticed that an error code assignment was only needed if an error had
> actually occured.

But that saved one line of code, and there are countless occurences in the 
kernel of such code pattern ;)
In any case, fine by me and not worth further discussion.



> --- a/fs/eventpoll.c
> +++ b/fs/eventpoll.c
> @@ -720,9 +720,10 @@ static int ep_getfd(int *efd, struct ino
>  
>  	/* Allocates an inode from the eventpoll file system */
>  	inode = ep_eventpoll_inode();
> -	error = PTR_ERR(inode);
> -	if (IS_ERR(inode))
> +	if (IS_ERR(inode)) {
> +		error = PTR_ERR(inode);
>  		goto eexit_2;
> +	}
>  
>  	/* Allocates a free descriptor to plug the file onto */
>  	error = get_unused_fd();



- Davide


-
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