Skip to content
Commit d40aa337 authored by Benoit Taine's avatar Benoit Taine Committed by J. Bruce Fields
Browse files

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: default avatarBenoit Taine <benoit.taine@lip6.fr>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent f35ea0d4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment