public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] Wrong error handling in nfs4acl
@ 2006-03-07 19:57 Eric Sesterhenn
  2006-03-07 22:58 ` J. Bruce Fields
  2006-03-07 23:06 ` Neil Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Sesterhenn @ 2006-03-07 19:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: neilb

hi,

this fixes coverity id #3. Coverity detected dead code,
since the == -1 comparison only returns 0 or 1 to error.
Therefore the if ( error < 0 ) statement was always false.
Seems that this was an if( error = nfs4... ) statement some time
ago, which got broken during cleanup.
Just compile tested.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>


--- linux-2.6.16-rc5-mm1/fs/nfsd/nfs4acl.c.orig	2006-03-07 20:52:34.000000000 +0100
+++ linux-2.6.16-rc5-mm1/fs/nfsd/nfs4acl.c	2006-03-07 20:53:08.000000000 +0100
@@ -790,7 +790,7 @@ nfs4_acl_split(struct nfs4_acl *acl, str
 			continue;
 
 		error = nfs4_acl_add_ace(dacl, ace->type, ace->flag,
-				ace->access_mask, ace->whotype, ace->who) == -1;
+				ace->access_mask, ace->whotype, ace->who);
 		if (error < 0)
 			goto out;
 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-07 23:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-07 19:57 [Patch] Wrong error handling in nfs4acl Eric Sesterhenn
2006-03-07 22:58 ` J. Bruce Fields
2006-03-07 23:06 ` Neil Brown
2006-03-07 23:15   ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox