* [2.6 patch] ieee80211_wx.c: remove dead code
@ 2006-03-15 16:40 Adrian Bunk
2006-03-18 1:14 ` John W. Linville
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2006-03-15 16:40 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
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>
--- linux-2.6.16-rc6-mm1-full/net/ieee80211/ieee80211_wx.c.old 2006-03-14 03:01:43.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/net/ieee80211/ieee80211_wx.c 2006-03-14 03:02:02.000000000 +0100
@@ -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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [2.6 patch] ieee80211_wx.c: remove dead code
2006-03-15 16:40 [2.6 patch] ieee80211_wx.c: remove dead code Adrian Bunk
@ 2006-03-18 1:14 ` John W. Linville
0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2006-03-18 1:14 UTC (permalink / raw)
To: Adrian Bunk; +Cc: netdev, linux-kernel
On Wed, Mar 15, 2006 at 05:40:15PM +0100, Adrian Bunk wrote:
> 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
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-18 1:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-15 16:40 [2.6 patch] ieee80211_wx.c: remove dead code Adrian Bunk
2006-03-18 1:14 ` John W. Linville
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).