Commit 2e9ab1e7 authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman

Staging: Correct use of ! and &

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: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 658ce9d6
...@@ -1840,10 +1840,8 @@ int rt_ioctl_siwencode(struct net_device *dev, ...@@ -1840,10 +1840,8 @@ int rt_ioctl_siwencode(struct net_device *dev,
} }
else else
/* Don't complain if only change the mode */ /* Don't complain if only change the mode */
if(!erq->flags & IW_ENCODE_MODE) if (!(erq->flags & IW_ENCODE_MODE))
{ return -EINVAL;
return -EINVAL;
}
} }
done: done:
......
...@@ -1409,8 +1409,7 @@ int iwctl_siwencode(struct net_device *dev, ...@@ -1409,8 +1409,7 @@ int iwctl_siwencode(struct net_device *dev,
// Do we want to just set the transmit key index ? // Do we want to just set the transmit key index ?
if ( index < 4 ) { if ( index < 4 ) {
pDevice->byKeyIndex = index; pDevice->byKeyIndex = index;
} } else if (!(wrq->flags & IW_ENCODE_MODE)) {
else if(!wrq->flags & IW_ENCODE_MODE) {
rc = -EINVAL; rc = -EINVAL;
return rc; return rc;
} }
......
Markdown is supported
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