From: Adrian Bunk <bunk@stusta.de>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-net@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/net/wireless/airo.c: correct a wrong check
Date: Fri, 25 Mar 2005 01:15:45 +0100 [thread overview]
Message-ID: <20050325001545.GG3966@stusta.de> (raw)
In-Reply-To: <20050322223403.GA19026@havoc.gtf.org>
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);
prev parent reply other threads:[~2005-03-25 1:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-22 22:05 [RFC: 2.6 patch] drivers/net/wireless/airo.c: correct a wrong Adrian Bunk
2005-03-22 22:17 ` Jeff Garzik
2005-03-22 22:30 ` Adrian Bunk
2005-03-22 22:34 ` Jeff Garzik
2005-03-25 0:15 ` Adrian Bunk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050325001545.GG3966@stusta.de \
--to=bunk@stusta.de \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox