Commit 7034ca4d authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman

Staging: rt2860,rt2870: Correct use of ! and &

IW_ENCODE_MODE is 0xF000 and thus !erq->flags & IW_ENCODE_MODE is always 0.
I assume that !(erq->flags & IW_ENCODE_MODE) was intended.

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
+ !(E & C)
)
// </smpl>
Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 88adc104
......@@ -1756,7 +1756,7 @@ int rt_ioctl_siwencode(struct net_device *dev,
}
else
/* Don't complain if only change the mode */
if(!erq->flags & IW_ENCODE_MODE) {
if (!(erq->flags & IW_ENCODE_MODE)) {
return -EINVAL;
}
}
......
......@@ -1776,7 +1776,7 @@ int rt_ioctl_siwencode(struct net_device *dev,
}
else
/* Don't complain if only change the mode */
if(!erq->flags & IW_ENCODE_MODE) {
if (!(erq->flags & IW_ENCODE_MODE)) {
return -EINVAL;
}
}
......
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