Skip to content

Commit

Permalink
[PATCH] ieee80211_wx.c: remove dead code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and John W. Linville committed May 5, 2006
1 parent 6d92f83 commit 6274115
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ieee80211/ieee80211_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6274115

Please sign in to comment.