Correct priority problem in the use of ! and &.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@ expression E; constant C; @@
- !E & C
+ !(E & C)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
else
/* Don't complain if only change the mode */
- if(!erq->flags & IW_ENCODE_MODE)
- {
- return -EINVAL;
- }
+ if (!(erq->flags & IW_ENCODE_MODE))
+ return -EINVAL;
}
done:
// Do we want to just set the transmit key index ?
if ( index < 4 ) {
pDevice->byKeyIndex = index;
- }
- else if(!wrq->flags & IW_ENCODE_MODE) {
+ } else if (!(wrq->flags & IW_ENCODE_MODE)) {
rc = -EINVAL;
return rc;
}