Skip to contentSkip to conversation

ieee80211_wx.c: remove dead code

PATCH Applied Adrian Bunk 2 participants 2 messages Mar 15, 2006 – Mar 18, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ieee80211_wx.c: remove dead code

Since sec->key_sizes[] is an u8, len can't be < 0.

Spotted by the Coverity checker.

net/ieee80211/ieee80211_wx.c renamed from net/ieee80211/ieee80211_wx.c.old +1 -1
@@ -505,7 +505,7 @@ int ieee80211_wx_get_encode(struct ieee8
 	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)
#1 lore raw
Quoted 3 lines · Adrian Bunk

Since sec->key_sizes[] is an u8, len can't be < 0.

Spotted by the Coverity checker.

Merged to upstream branch of wireless-2.6...thanks!

John

Signature · 2 lines
John W. Linville
[email protected]