staging:wlags49_h2: Removed assignments from if statements.
authorChi Pham <fempsci@gmail.com>
Sun, 9 Mar 2014 13:40:28 +0000 (14:40 +0100)
committerPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Mon, 10 Mar 2014 21:56:33 +0000 (14:56 -0700)
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>
drivers/staging/wlags49_h2/wl_main.c

index bf6a62eef81566194379f76df49ada3610c130f7..fc98b6dbdb897766c3410c5a3ca988138a960af7 100644 (file)
@@ -1528,7 +1528,8 @@ int wl_put_ltv( struct wl_private *lp )
        hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
 
        /* Own Name (Station Nickname) */
-       if (( len = ( strlen( lp->StationName ) + 1 ) & ~0x01 ) != 0 ) {
+       len = (strlen(lp->StationName) + 1) & ~0x01;
+       if (len != 0) {
                //DBG_TRACE( DbgInfo, "CFG_CNF_OWN_NAME                  : %s\n",
                //           lp->StationName );