]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: Remove assignments inside conditions
authorBenoit Taine <benoit.taine@lip6.fr>
Thu, 22 May 2014 14:32:30 +0000 (16:32 +0200)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 22 May 2014 19:52:23 +0000 (15:52 -0400)
commitfecc53fae7f541543a0ab76affaff48dee79b787
tree850ddb4df00cc40eb34f0b2ff2dbfe77d62f774e
parentd63f40a39e4dfb51987d5d56cf18daccf543c156
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>
fs/nfsd/nfs2acl.c
fs/nfsd/nfs3acl.c
fs/nfsd/nfs3xdr.c
fs/nfsd/nfsxdr.c