From patchwork Thu Dec 27 15:46:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Jarosch X-Patchwork-Id: 208331 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 800CA2C00BE for ; Fri, 28 Dec 2012 02:47:08 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752860Ab2L0Pqf (ORCPT ); Thu, 27 Dec 2012 10:46:35 -0500 Received: from re04.intra2net.com ([82.165.46.26]:48980 "EHLO re04.intra2net.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752804Ab2L0Pqf (ORCPT ); Thu, 27 Dec 2012 10:46:35 -0500 Received: from intranator.m.i2n (unknown [172.16.1.99]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by re04.intra2net.com (Postfix) with ESMTP id 33D65300D5; Thu, 27 Dec 2012 16:46:33 +0100 (CET) Received: from localhost (intranator.m.i2n [127.0.0.1]) by localhost (Postfix) with ESMTP id F11C82AC57; Thu, 27 Dec 2012 16:46:32 +0100 (CET) X-Virus-Scanned: by Intranator (www.intra2net.com) with AMaViS and F-Secure AntiVirus (fsavdb 2012-12-27_06) X-Spam-Status: X-Spam-Level: 0 Received: from storm.localnet (storm.m.i2n [172.16.1.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by intranator.m.i2n (Postfix) with ESMTPS id 1C6C02AC54; Thu, 27 Dec 2012 16:46:29 +0100 (CET) From: Thomas Jarosch To: netfilter-devel@vger.kernel.org Cc: Jozsef Kadlecsik Subject: [ipset PATCH] Fix wrong bracket placing Date: Thu, 27 Dec 2012 16:46:29 +0100 Message-ID: <1952176.MYFl3FrgUH@storm> User-Agent: KMail/4.9.3 (Linux/3.6.9-2.fc17.x86_64; KDE/4.9.3; x86_64; ; ) MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org cppcheck (vaguely) reported: [lib/parse.c:448]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses. Signed-off-by: Thomas Jarosch --- 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); }