Linux SPARSE checker discussions
 help / color / mirror / Atom feed
From: Nicolas Kaiser <nikai@nikai.net>
To: Christopher Li <sparse@chrisli.org>
Cc: linux-sparse@vger.kernel.org
Subject: [PATCH] memops.c: always true expression
Date: Sun, 21 Nov 2010 21:25:48 +0100	[thread overview]
Message-ID: <20101121212548.6230da08@absol.kitzblitz> (raw)

I noticed that the second part of this conditional is always true.
Just a shot in the dark: Could that be a typo?

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
 memops.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/memops.c b/memops.c
index 9eafb72..45bd340 100644
--- a/memops.c
+++ b/memops.c
@@ -69,7 +69,7 @@ static int address_taken(pseudo_t pseudo)
 	struct pseudo_user *pu;
 	FOR_EACH_PTR(pseudo->users, pu) {
 		struct instruction *insn = pu->insn;
-		if (insn->bb && (insn->opcode != OP_LOAD || insn->opcode != OP_STORE))
+		if (insn->bb && (insn->opcode != OP_LOAD && insn->opcode != OP_STORE))
 			return 1;
 	} END_FOR_EACH_PTR(pu);
 	return 0;
-- 
1.7.2.2

             reply	other threads:[~2010-11-21 20:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-21 20:25 Nicolas Kaiser [this message]
2010-11-23 10:10 ` [PATCH] memops.c: always true expression Christopher Li
2010-11-23 14:50   ` Anderson Lizardo

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=20101121212548.6230da08@absol.kitzblitz \
    --to=nikai@nikai.net \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.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