[PATCH] ieee80211_wx.c: remove dead code
authorAdrian Bunk <bunk@stusta.de>
Thu, 27 Apr 2006 09:33:42 +0000 (02:33 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 5 May 2006 21:10:40 +0000 (17:10 -0400)
Since sec->key_sizes[] is an u8, len can't be < 0.

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/ieee80211/ieee80211_wx.c

index 0ea55cb5f17252a1fa3a81d6d6081748bc215375..a78c4f845f66a88f3a2f95fb59adc8790c6af723 100644 (file)
@@ -503,7 +503,7 @@ int ieee80211_wx_get_encode(struct ieee80211_device *ieee,
        len = sec->key_sizes[key];
        memcpy(keybuf, sec->keys[key], len);
 
-       erq->length = (len >= 0 ? len : 0);
+       erq->length = len;
        erq->flags |= IW_ENCODE_ENABLED;
 
        if (ieee->open_wep)