Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging:wlags49_h2: Removed assignments from if statements.

The following coccinelle script found the match:

@@
expression E0, E1, E2;
statement S0, S1;
@@
- if ((E1 = E2) != E0)
+ E1 = E2;
+ if (E1 != E0)
S0 else S1

Signed-off-by: Chi Pham <fempsci@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>

authored by

Chi Pham and committed by
Peter P Waskiewicz Jr
b5bed1b6 02692986

+2 -1
+2 -1
drivers/staging/wlags49_h2/wl_main.c
··· 1528 1528 hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord )); 1529 1529 1530 1530 /* Own Name (Station Nickname) */ 1531 - if (( len = ( strlen( lp->StationName ) + 1 ) & ~0x01 ) != 0 ) { 1531 + len = (strlen(lp->StationName) + 1) & ~0x01; 1532 + if (len != 0) { 1532 1533 //DBG_TRACE( DbgInfo, "CFG_CNF_OWN_NAME : %s\n", 1533 1534 // lp->StationName ); 1534 1535