rndis_wlan: make some variables unsigned
authorDan Carpenter <[email protected]>
Wed, 29 Feb 2012 06:36:57 +0000 (09:36 +0300)
committerJohn W. Linville <[email protected]>
Mon, 5 Mar 2012 20:23:16 +0000 (15:23 -0500)
These variables can never be less than zero because we cap them in
get_device_pmkids().  Let's make them unsigned here because it's simpler
to not have to worry about negative numbers when we read the code.

Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Jussi Kivilinna <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
drivers/net/wireless/rndis_wlan.c

index 1bde2eb542553b30a0eba167a83b41449fc17bf1..454f2f1823424a03ddedc311949a97299ce5576e 100644 (file)
@@ -1790,7 +1790,8 @@ static struct ndis_80211_pmkid *remove_pmkid(struct usbnet *usbdev,
                                                struct cfg80211_pmksa *pmksa,
                                                int max_pmkids)
 {
-       int i, count, newlen, err;
+       int i, newlen, err;
+       unsigned int count;
 
        count = le32_to_cpu(pmkids->bssid_info_count);
 
@@ -1830,7 +1831,8 @@ static struct ndis_80211_pmkid *update_pmkid(struct usbnet *usbdev,
                                                struct cfg80211_pmksa *pmksa,
                                                int max_pmkids)
 {
-       int i, err, count, newlen;
+       int i, err, newlen;
+       unsigned int count;
 
        count = le32_to_cpu(pmkids->bssid_info_count);