iwmc3200wifi: clarify potentially undefined operation in iwm_scan_ssids
authorJohn W. Linville <linville@tuxdriver.com>
Tue, 16 Nov 2010 21:08:56 +0000 (16:08 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 18 Nov 2010 19:22:21 +0000 (14:22 -0500)
  CC [M]  drivers/net/wireless/iwmc3200wifi/commands.o
drivers/net/wireless/iwmc3200wifi/commands.c: In function ‘iwm_scan_ssids’:
drivers/net/wireless/iwmc3200wifi/commands.c:911:15: warning: operation on ‘iwm->scan_id’ may be undefined

Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwmc3200wifi/commands.c

index 330c7d9cf101733bd70ef40476a592592068c641..50dee6a0a5cac07af17e2f8ba60d088badc02c06 100644 (file)
@@ -908,7 +908,7 @@ int iwm_scan_ssids(struct iwm_priv *iwm, struct cfg80211_ssid *ssids,
                return ret;
        }
 
-       iwm->scan_id = iwm->scan_id++ % IWM_SCAN_ID_MAX;
+       iwm->scan_id = (iwm->scan_id + 1) % IWM_SCAN_ID_MAX;
 
        return 0;
 }