From: roel kluin <roel.kluin@gmail.com>
To: "Jörg-Volker Peetz" <jvpeetz@web.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: &&//|| typo ?
Date: Tue, 17 Feb 2009 16:07:46 +0100 [thread overview]
Message-ID: <25e057c00902170707h3fa82669oc22ad534c340e48f@mail.gmail.com> (raw)
In-Reply-To: <gncm7q$gp8$1@ger.gmane.org>
2009/2/16 Jörg-Volker Peetz <jvpeetz@web.de>:
> Hi,
>
> inspired by the mail http://lkml.org/lkml/2009/2/15/159
> I did
>
> grep -Ern '\!=.*\|\|.*\!=' linux-2.6.28.5
>
> and found the following tests which are always true if the tested variable is
> not NaN:
> linux-2.6.28.5/arch/x86/kvm/vmx.c:1794: if ((ss.type != 3) || (ss.type != 7))
> linux-2.6.28.5/arch/x86/kvm/vmx.c:1837: if ((tr.type != 3) || (tr.type != 11))
> /* TODO: Check if guest is in IA32e mode */
Ok, I sent a patch
> linux-2.6.28.5/net/sunrpc/auth_unix.c:122: if (cred->uc_uid != acred->uid ||
> cred->uc_gid != acred->gid)
>
> linux-2.6.28.5/net/sunrpc/svcauth_unix.c:747: if (svc_getu32(argv) !=
> htonl(RPC_AUTH_NULL) || svc_getu32(argv) != 0) {
> linux-2.6.28.5/net/sunrpc/svcauth_unix.c:833: if (svc_getu32(argv) !=
> htonl(RPC_AUTH_NULL) || svc_getu32(argv) != 0) {
>
> linux-2.6.28.5/net/sunrpc/auth_gss/gss_krb5_seqnum.c:78: if ((plain[4] !=
> plain[5]) || (plain[4] != plain[6])
> linux-2.6.28.5/net/sunrpc/auth_gss/gss_krb5_seqnum.c:79: || (plain[4] !=
> plain[7]))
I don't think this is a bug, this tests whether all are the same.
> linux-2.6.28.5/drivers/block/paride/pf.c:569: if ((buf[k + offs] != 0x20) ||
> (buf[k + offs] != l))
I am not sure this is a bug: l can become 0x20.
> linux-2.6.28.5/drivers/block/paride/pg.c:425: if (c != ' ' || c != l)
also c can become ' '
> linux-2.6.28.5/drivers/block/paride/pt.c:506: if ((buf[k + offs] != 0x20) ||
> (buf[k + offs] != l))
again
> linux-2.6.28.5/drivers/misc/sgi-gru/grukservices.c:612: if (word0 != word1 ||
> word0 != MAGIC) {
Not sure either.
>
> linux-2.6.28.5/drivers/scsi/gvp11.c:283: if (qq != q || qq != 0xff) /* should be
> read only, all 1's */
again
> linux-2.6.28.5/drivers/scsi/FlashPoint.c:6045: if(bit_cnt != 0 || bit_cnt != 8)
I also spotted this but it's in comment and a pretty old driver, so I
didn't bother.
next prev parent reply other threads:[~2009-02-17 15:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 21:35 Jörg-Volker Peetz
2009-02-17 7:04 ` Takashi Iwai
2009-02-17 15:07 ` roel kluin [this message]
2009-03-05 9:30 ` Benny Halevy
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=25e057c00902170707h3fa82669oc22ad534c340e48f@mail.gmail.com \
--to=roel.kluin@gmail.com \
--cc=jvpeetz@web.de \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®