All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Jarosch <thomas.jarosch@intra2net.com>
To: netfilter-devel@vger.kernel.org
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Subject: [ipset PATCH] Fix wrong bracket placing
Date: Thu, 27 Dec 2012 16:46:29 +0100	[thread overview]
Message-ID: <1952176.MYFl3FrgUH@storm> (raw)

cppcheck (vaguely) reported:
[lib/parse.c:448]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
---
 lib/parse.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/parse.c b/lib/parse.c
index 550048c..d06e9cd 100644
--- a/lib/parse.c
+++ b/lib/parse.c
@@ -445,8 +445,8 @@ ipset_parse_proto(struct ipset_session *session,
 		uint8_t protonum;
 		int err;
 
-		if (!((err = string_to_u8(session, str, &protonum) == 0) &&
-		      (protoent = getprotobynumber(protonum)) != NULL))
+		if (!((err = string_to_u8(session, str, &protonum)) == 0) &&
+		      (protoent = getprotobynumber(protonum)) != NULL)
 			return syntax_err("cannot parse '%s' "
 					  "as a protocol", str);
 	}
-- 
1.7.11.7


             reply	other threads:[~2012-12-27 15:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27 15:46 Thomas Jarosch [this message]
2013-01-09 22:40 ` [ipset PATCH] Fix wrong bracket placing Jozsef Kadlecsik

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=1952176.MYFl3FrgUH@storm \
    --to=thomas.jarosch@intra2net.com \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.