Received: by 10.223.185.116 with SMTP id b49csp3107717wrg; Mon, 5 Mar 2018 14:20:58 -0800 (PST) X-Google-Smtp-Source: AG47ELv74Sj1FssX3ZwcWu0VhY7IEhvIO8/NfGeRmLACKwpidlRh8GM5Xnij3GigVqmLkQSCSZPk X-Received: by 2002:a17:902:523:: with SMTP id 32-v6mr14436860plf.145.1520288458695; Mon, 05 Mar 2018 14:20:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520288458; cv=none; d=google.com; s=arc-20160816; b=kci3PoF2YA7N699uJFYmo/dlIJS3dKo704yKRMRP5c4M3cxEwAkaOG2zPRLo+tj175 rmkD3s/BcqbObI1m+wmI6HrpKd7JCmW3SGxRTXPnX0os5ysX8q2a5ltrRJJVaBdg2A/v 0JS9zfMtSO9HMQWAx4bQWPPDaH6NeTywhSmi6f4/J5dgfZ2Bftj1AF0wlRBNsAmDMlUB foCWcM7XUn/QZtXrpDMYICbl9jDRq2XwKOOSEel71gmQ1b8BoMMkrkbhi/vdnXrDjB19 iihE51fKqTjeQ8KUvvkfDmRVhabHKtazT0JELP1X24MCccijSfSstZ42QmR+QtmaWENn 8KBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=jmHnvBPRYGw/vzOC7FrsILB3Crl40JDVirfQ8GmW8VQ=; b=WfbY9b8q6yn65qsDUW63lGimi4c7WeQOnQBC+AqlGxLsK3b4F04eo1VNJRJu6bmYES fayM6RbY2E5t1HRRbEVuFHgkXnJotOh4igIF82gHTGLGStCFZ0j+ZlJmFHQT/DxrXvcD xOe1F7UV0Vt2paRhSfq9sVHAAz4BmzLxJXtBjd9NbIkg56gxGUlL2gUA+piyZ26lzhMC Ctixm++w0f9s+dbw+ux8rpFigeXD/XvoEg9P1nS1xvwpG+fXWFKKt+bPDvW8XOjJCjA5 Jf9lPQtoF2Yl0jkYf7+FSrqYaTagu+tZqhciVR7HovxuJGg4VYHqqitE1okwniw6aB0d FbZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3-v6si9931707plb.480.2018.03.05.14.20.44; Mon, 05 Mar 2018 14:20:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753120AbeCEV5g (ORCPT + 99 others); Mon, 5 Mar 2018 16:57:36 -0500 Received: from gateway23.websitewelcome.com ([192.185.49.180]:25621 "EHLO gateway23.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753002AbeCEV5f (ORCPT ); Mon, 5 Mar 2018 16:57:35 -0500 X-Greylist: delayed 1294 seconds by postgrey-1.27 at vger.kernel.org; Mon, 05 Mar 2018 16:57:35 EST Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 4CEEC17ABD for ; Mon, 5 Mar 2018 15:36:00 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id sxm3emDPKhMYJsxm3eSarw; Mon, 05 Mar 2018 15:35:59 -0600 Received: from 187-162-245-224.static.axtel.net ([187.162.245.224]:41084 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.89_1) (envelope-from ) id 1esxm3-001ikV-6p; Mon, 05 Mar 2018 15:35:59 -0600 Date: Mon, 5 Mar 2018 15:35:57 -0600 From: "Gustavo A. R. Silva" To: Wensong Zhang , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" Cc: netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] ipvs: use true and false for boolean values Message-ID: <20180305213557.GA12365@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 187.162.245.224 X-Source-L: No X-Exim-ID: 1esxm3-001ikV-6p X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 187-162-245-224.static.axtel.net (embeddedor) [187.162.245.224]:41084 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 12 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/netfilter/ipvs/ip_vs_lblc.c | 4 ++-- net/netfilter/ipvs/ip_vs_lblcr.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c index 6a340c9..942e835 100644 --- a/net/netfilter/ipvs/ip_vs_lblc.c +++ b/net/netfilter/ipvs/ip_vs_lblc.c @@ -238,7 +238,7 @@ static void ip_vs_lblc_flush(struct ip_vs_service *svc) int i; spin_lock_bh(&svc->sched_lock); - tbl->dead = 1; + tbl->dead = true; for (i = 0; i < IP_VS_LBLC_TAB_SIZE; i++) { hlist_for_each_entry_safe(en, next, &tbl->bucket[i], list) { ip_vs_lblc_del(en); @@ -369,7 +369,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc) tbl->max_size = IP_VS_LBLC_TAB_SIZE*16; tbl->rover = 0; tbl->counter = 1; - tbl->dead = 0; + tbl->dead = false; tbl->svc = svc; /* diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c index 0627881..a5acab2 100644 --- a/net/netfilter/ipvs/ip_vs_lblcr.c +++ b/net/netfilter/ipvs/ip_vs_lblcr.c @@ -404,7 +404,7 @@ static void ip_vs_lblcr_flush(struct ip_vs_service *svc) struct hlist_node *next; spin_lock_bh(&svc->sched_lock); - tbl->dead = 1; + tbl->dead = true; for (i = 0; i < IP_VS_LBLCR_TAB_SIZE; i++) { hlist_for_each_entry_safe(en, next, &tbl->bucket[i], list) { ip_vs_lblcr_free(en); @@ -532,7 +532,7 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc) tbl->max_size = IP_VS_LBLCR_TAB_SIZE*16; tbl->rover = 0; tbl->counter = 1; - tbl->dead = 0; + tbl->dead = false; tbl->svc = svc; /* -- 2.7.4