lkml.org 
[lkml]   [2005]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.6 patch] drivers/net/wireless/airo.c: correct a wrong check
On Tue, Mar 22, 2005 at 05:34:03PM -0500, Jeff Garzik wrote:
> On Tue, Mar 22, 2005 at 11:30:56PM +0100, Adrian Bunk wrote:
>...
> > Is this "if" simply superfluous?
> > Or should the && be an || ?
>
> Yes, it looks like it should be "||".

Patch below.

> Jeff

cu
Adrian


<-- snip -->


The Coverity checker correctly noted that this condition can't ever be
fulfilled.

This patch changes it to what it should have been.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.12-rc1-mm1-full/drivers/net/wireless/airo.c.old 2005-03-22 21:41:37.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/drivers/net/wireless/airo.c 2005-03-22 22:50:03.000000000 +0100
@@ -3440,7 +3440,7 @@
/* Make sure we got something */
if (rxd.rdy && rxd.valid == 0) {
len = rxd.len + 12;
- if (len < 12 && len > 2048)
+ if (len < 12 || len > 2048)
goto badrx;

skb = dev_alloc_skb(len);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.037 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site