Commit 6274115c authored by Adrian Bunk's avatar Adrian Bunk Committed by John W. Linville

[PATCH] ieee80211_wx.c: remove dead code

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

Spotted by the Coverity checker.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6d92f83f
...@@ -503,7 +503,7 @@ int ieee80211_wx_get_encode(struct ieee80211_device *ieee, ...@@ -503,7 +503,7 @@ int ieee80211_wx_get_encode(struct ieee80211_device *ieee,
len = sec->key_sizes[key]; len = sec->key_sizes[key];
memcpy(keybuf, sec->keys[key], len); memcpy(keybuf, sec->keys[key], len);
erq->length = (len >= 0 ? len : 0); erq->length = len;
erq->flags |= IW_ENCODE_ENABLED; erq->flags |= IW_ENCODE_ENABLED;
if (ieee->open_wep) if (ieee->open_wep)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment