From patchwork Thu Nov 10 12:57:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jozsef Kadlecsik X-Patchwork-Id: 693203 X-Patchwork-Delegate: pablo@netfilter.org 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 3tF3522Ktbz9t2F for ; Thu, 10 Nov 2016 23:58:30 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=blackhole.kfki.hu header.i=@blackhole.kfki.hu header.b="W6OiE1/A"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933300AbcKJM6R (ORCPT ); Thu, 10 Nov 2016 07:58:17 -0500 Received: from smtp2.kfki.hu ([148.6.0.28]:49065 "EHLO smtp2.kfki.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933291AbcKJM6Q (ORCPT ); Thu, 10 Nov 2016 07:58:16 -0500 Received: from localhost (localhost [127.0.0.1]) by smtp2.kfki.hu (Postfix) with ESMTP id E3360CC0125; Thu, 10 Nov 2016 13:58:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= blackhole.kfki.hu; h=references:in-reply-to:x-mailer:message-id :date:date:from:from:received:received:received; s=20151130; t= 1478782692; x=1480597093; bh=bKq8LbD+C5oDUAJIKS9bcKX+nmqmTOT1h3t njVa6rEs=; b=W6OiE1/AIeCYqz/kvwM6zvAzApJFG1FXicvlysyp1AvkXD5ZBy2 Tu65MuWdCZ0gMcFOGb4D8ahCYn+vCPtpWva4BMv3LkIH0g/A/NBLD7KrXpdFx02D LltqktA3H1GXwe5PAtObS8RPcORe+apoEzL1qGJv1VrZ/Nz4vaOQnYR0= X-Virus-Scanned: Debian amavisd-new at smtp2.kfki.hu Received: from smtp2.kfki.hu ([127.0.0.1]) by localhost (smtp2.kfki.hu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nuwCXNaNsU1r; Thu, 10 Nov 2016 13:58:12 +0100 (CET) Received: from blackhole.kfki.hu (blackhole.kfki.hu [148.6.0.114]) by smtp2.kfki.hu (Postfix) with ESMTP id 3CE7ACC0129; Thu, 10 Nov 2016 13:57:58 +0100 (CET) Received: by blackhole.kfki.hu (Postfix, from userid 1000) id 24CE822991; Thu, 10 Nov 2016 13:57:58 +0100 (CET) From: Jozsef Kadlecsik To: netfilter-devel@vger.kernel.org Cc: Pablo Neira Ayuso Subject: [PATCH 22/22] netfilter: ipset: hash: fix boolreturn.cocci warnings Date: Thu, 10 Nov 2016 13:57:56 +0100 Message-Id: <1478782676-9770-23-git-send-email-kadlec@blackhole.kfki.hu> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1478782676-9770-1-git-send-email-kadlec@blackhole.kfki.hu> References: <1478782676-9770-1-git-send-email-kadlec@blackhole.kfki.hu> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: kbuild test robot net/netfilter/ipset/ip_set_hash_ipmac.c:70:8-9: WARNING: return of 0/1 in function 'hash_ipmac4_data_list' with return type bool net/netfilter/ipset/ip_set_hash_ipmac.c:178:8-9: WARNING: return of 0/1 in function 'hash_ipmac6_data_list' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: Tomasz Chilinski Signed-off-by: Fengguang Wu Signed-off-by: Jozsef Kadlecsik --- net/netfilter/ipset/ip_set_hash_ipmac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/netfilter/ipset/ip_set_hash_ipmac.c b/net/netfilter/ipset/ip_set_hash_ipmac.c index d9eb144..1ab5ed2 100644 --- a/net/netfilter/ipset/ip_set_hash_ipmac.c +++ b/net/netfilter/ipset/ip_set_hash_ipmac.c @@ -67,10 +67,10 @@ struct hash_ipmac4_elem { if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, e->ip) || nla_put(skb, IPSET_ATTR_ETHER, ETH_ALEN, e->ether)) goto nla_put_failure; - return 0; + return false; nla_put_failure: - return 1; + return true; } static inline void @@ -175,10 +175,10 @@ struct hash_ipmac6_elem { if (nla_put_ipaddr6(skb, IPSET_ATTR_IP, &e->ip.in6) || nla_put(skb, IPSET_ATTR_ETHER, ETH_ALEN, e->ether)) goto nla_put_failure; - return 0; + return false; nla_put_failure: - return 1; + return true; } static inline void