From: Julia Lawall Date: Mon, 27 Jul 2009 19:59:48 +0000 (+0200) Subject: Staging: Correct use of ! and & X-Git-Tag: MMI-PSA29.97-13-9~26941^2~268 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2e9ab1e72c631041f8a1c1d1fc7e5359e7e4a476;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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/) // @@ expression E; constant C; @@ - !E & C + !(E & C) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rt3090/sta_ioctl.c b/drivers/staging/rt3090/sta_ioctl.c index 93efd7f5bf3f..b8ab84a0469b 100644 --- a/drivers/staging/rt3090/sta_ioctl.c +++ b/drivers/staging/rt3090/sta_ioctl.c @@ -1840,10 +1840,8 @@ int rt_ioctl_siwencode(struct net_device *dev, } 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: diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index e4fdb6fc6eab..96f2a78994be 100644 --- a/drivers/staging/vt6656/iwctl.c +++ b/drivers/staging/vt6656/iwctl.c @@ -1409,8 +1409,7 @@ int iwctl_siwencode(struct net_device *dev, // 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; }