All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sesterhenn <snakebyte@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: neilb@cse.unsw.edu.au
Subject: [Patch] Wrong error handling in nfs4acl
Date: Tue, 07 Mar 2006 20:57:00 +0100	[thread overview]
Message-ID: <1141761420.7561.7.camel@alice> (raw)

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;
 



             reply	other threads:[~2006-03-07 19:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-07 19:57 Eric Sesterhenn [this message]
2006-03-07 22:58 ` [Patch] Wrong error handling in nfs4acl J. Bruce Fields
2006-03-07 23:06 ` Neil Brown
2006-03-07 23:15   ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1141761420.7561.7.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.