summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs3acl.c
diff options
context:
space:
mode:
authorBenoit Taine2014-05-22 16:32:30 +0200
committerJ. Bruce Fields2014-05-22 21:52:23 +0200
commitd40aa3372f90d478b6166df0321349b5aeb0aea8 (patch)
tree850ddb4df00cc40eb34f0b2ff2dbfe77d62f774e /fs/nfsd/nfs3acl.c
parentMerge 3.15 bugfixes for 3.16 (diff)
downloadkernel-qcow2-linux-d40aa3372f90d478b6166df0321349b5aeb0aea8.tar.gz
kernel-qcow2-linux-d40aa3372f90d478b6166df0321349b5aeb0aea8.tar.xz
kernel-qcow2-linux-d40aa3372f90d478b6166df0321349b5aeb0aea8.zip
nfsd: Remove assignments inside conditions
Assignments should not happen inside an if conditional, but in the line before. This issue was reported by checkpatch. The semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i1; expression e1; statement S; @@ -if(!(i1 = e1)) S +i1 = e1; +if(!i1) +S // </smpl> It has been tested by compilation. Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs3acl.c')
-rw-r--r--fs/nfsd/nfs3acl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c
index adc5f1b1dc26..2a514e21dc74 100644
--- a/fs/nfsd/nfs3acl.c
+++ b/fs/nfsd/nfs3acl.c
@@ -128,7 +128,8 @@ out:
static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_getaclargs *args)
{
- if (!(p = nfs3svc_decode_fh(p, &args->fh)))
+ p = nfs3svc_decode_fh(p, &args->fh);
+ if (!p)
return 0;
args->mask = ntohl(*p); p++;
@@ -143,7 +144,8 @@ static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
unsigned int base;
int n;
- if (!(p = nfs3svc_decode_fh(p, &args->fh)))
+ p = nfs3svc_decode_fh(p, &args->fh);
+ if (!p)
return 0;
args->mask = ntohl(*p++);
if (args->mask & ~(NFS_ACL|NFS_ACLCNT|NFS_DFACL|NFS_DFACLCNT) ||