summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2016-02-13 06:18:02 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-15 00:34:08 (GMT)
commit0c42bc25ed916d0fba1205cbdf668c38717fca77 (patch)
tree8fc4a2858b7e0568dcfa75464face06eefc99c26 /drivers
parent12f2a7b900f0fa8e2f466630c8bc76444aaf9f68 (diff)
downloadlinux-0c42bc25ed916d0fba1205cbdf668c38717fca77.tar.xz
Staging: wlan-ng: Remove multiple assignments
Remove multiple assignments by factorizing them. Made a coccinelle script to match cases: @@ identifier a,b; constant c; @@ -a=b=c; +a=c; +b=c; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/wlan-ng/p80211wep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/wlan-ng/p80211wep.c b/drivers/staging/wlan-ng/p80211wep.c
index e9f990a..22c7970 100644
--- a/drivers/staging/wlan-ng/p80211wep.c
+++ b/drivers/staging/wlan-ng/p80211wep.c
@@ -188,7 +188,8 @@ int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override,
/* Apply the RC4 to the data, update the CRC32 */
crc = ~0;
- i = j = 0;
+ i = 0;
+ j = 0;
for (k = 0; k < len; k++) {
i = (i + 1) & 0xff;
j = (j + s[i]) & 0xff;
@@ -260,7 +261,8 @@ int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum,
/* Update CRC32 then apply RC4 to the data */
crc = ~0;
- i = j = 0;
+ i = 0;
+ j = 0;
for (k = 0; k < len; k++) {
crc = wep_crc32_table[(crc ^ buf[k]) & 0xff] ^ (crc >> 8);
i = (i + 1) & 0xff;