diff options
author | Julia Lawall <julia@diku.dk> | 2008-12-24 16:24:05 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 14:53:30 -0700 |
commit | 7034ca4dda60f213d2d428da690710da6ea9a8df (patch) | |
tree | 0b58b090337789a92de6c6af50324f6e616e5d09 /drivers/staging/rt2870 | |
parent | 88adc104476cccb4b5cfaa48da7019cf9184481b (diff) |
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: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2870')
-rw-r--r-- | drivers/staging/rt2870/sta_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rt2870/sta_ioctl.c b/drivers/staging/rt2870/sta_ioctl.c index 91f0fab1131..4b432ce4442 100644 --- a/drivers/staging/rt2870/sta_ioctl.c +++ b/drivers/staging/rt2870/sta_ioctl.c @@ -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; } } |