All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: linux-kernel@vger.kernel.org,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Patrick McHardy <kaber@trash.net>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: "David S. Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	netdev@vger.kernel.org
Subject: [PATCH 23/25] netfilter: Use bool function return values of true/false not 1/0
Date: Mon, 30 Mar 2015 16:46:21 -0700	[thread overview]
Message-ID: <6f7ba321bbfe862cb7244664f2db08c430523ff3.1427759010.git.joe@perches.com> (raw)
In-Reply-To: <cover.1427759009.git.joe@perches.com>

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/ipv4/netfilter/ipt_ah.c                  | 2 +-
 net/netfilter/ipset/ip_set_hash_ip.c         | 8 ++++----
 net/netfilter/ipset/ip_set_hash_ipmark.c     | 8 ++++----
 net/netfilter/ipset/ip_set_hash_ipport.c     | 8 ++++----
 net/netfilter/ipset/ip_set_hash_ipportip.c   | 8 ++++----
 net/netfilter/ipset/ip_set_hash_ipportnet.c  | 8 ++++----
 net/netfilter/ipset/ip_set_hash_net.c        | 8 ++++----
 net/netfilter/ipset/ip_set_hash_netiface.c   | 8 ++++----
 net/netfilter/ipset/ip_set_hash_netport.c    | 8 ++++----
 net/netfilter/ipset/ip_set_hash_netportnet.c | 8 ++++----
 net/netfilter/xt_connlimit.c                 | 2 +-
 net/netfilter/xt_hashlimit.c                 | 2 +-
 net/netfilter/xt_ipcomp.c                    | 2 +-
 13 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/net/ipv4/netfilter/ipt_ah.c b/net/ipv4/netfilter/ipt_ah.c
index 14a2aa8..756c004 100644
--- a/net/ipv4/netfilter/ipt_ah.c
+++ b/net/ipv4/netfilter/ipt_ah.c
@@ -47,7 +47,7 @@ static bool ah_mt(const struct sk_buff *skb, struct xt_action_param *par)
 		 */
 		pr_debug("Dropping evil AH tinygram.\n");
 		par->hotdrop = true;
-		return 0;
+		return false;
 	}
 
 	return spi_match(ahinfo->spis[0], ahinfo->spis[1],
diff --git a/net/netfilter/ipset/ip_set_hash_ip.c b/net/netfilter/ipset/ip_set_hash_ip.c
index 76959d7..a7d6262 100644
--- a/net/netfilter/ipset/ip_set_hash_ip.c
+++ b/net/netfilter/ipset/ip_set_hash_ip.c
@@ -61,10 +61,10 @@ hash_ip4_data_list(struct sk_buff *skb, const struct hash_ip4_elem *e)
 {
 	if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, e->ip))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -196,10 +196,10 @@ hash_ip6_data_list(struct sk_buff *skb, const struct hash_ip6_elem *e)
 {
 	if (nla_put_ipaddr6(skb, IPSET_ATTR_IP, &e->ip.in6))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_ipmark.c b/net/netfilter/ipset/ip_set_hash_ipmark.c
index 7abf978..327b331 100644
--- a/net/netfilter/ipset/ip_set_hash_ipmark.c
+++ b/net/netfilter/ipset/ip_set_hash_ipmark.c
@@ -63,10 +63,10 @@ hash_ipmark4_data_list(struct sk_buff *skb,
 	if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip) ||
 	    nla_put_net32(skb, IPSET_ATTR_MARK, htonl(data->mark)))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -191,10 +191,10 @@ hash_ipmark6_data_list(struct sk_buff *skb,
 	if (nla_put_ipaddr6(skb, IPSET_ATTR_IP, &data->ip.in6) ||
 	    nla_put_net32(skb, IPSET_ATTR_MARK, htonl(data->mark)))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_ipport.c b/net/netfilter/ipset/ip_set_hash_ipport.c
index dcbcceb..b4748e9 100644
--- a/net/netfilter/ipset/ip_set_hash_ipport.c
+++ b/net/netfilter/ipset/ip_set_hash_ipport.c
@@ -69,10 +69,10 @@ hash_ipport4_data_list(struct sk_buff *skb,
 	    nla_put_net16(skb, IPSET_ATTR_PORT, data->port) ||
 	    nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -231,10 +231,10 @@ hash_ipport6_data_list(struct sk_buff *skb,
 	    nla_put_net16(skb, IPSET_ATTR_PORT, data->port) ||
 	    nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_ipportip.c b/net/netfilter/ipset/ip_set_hash_ipportip.c
index 7ef93fc..607461b 100644
--- a/net/netfilter/ipset/ip_set_hash_ipportip.c
+++ b/net/netfilter/ipset/ip_set_hash_ipportip.c
@@ -70,10 +70,10 @@ hash_ipportip4_data_list(struct sk_buff *skb,
 	    nla_put_net16(skb, IPSET_ATTR_PORT, data->port) ||
 	    nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -240,10 +240,10 @@ hash_ipportip6_data_list(struct sk_buff *skb,
 	    nla_put_net16(skb, IPSET_ATTR_PORT, data->port) ||
 	    nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_ipportnet.c b/net/netfilter/ipset/ip_set_hash_ipportnet.c
index b6012ad..f607ec9 100644
--- a/net/netfilter/ipset/ip_set_hash_ipportnet.c
+++ b/net/netfilter/ipset/ip_set_hash_ipportnet.c
@@ -114,10 +114,10 @@ hash_ipportnet4_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -367,10 +367,10 @@ hash_ipportnet6_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_net.c b/net/netfilter/ipset/ip_set_hash_net.c
index 6b3ac10..8bb8cd4 100644
--- a/net/netfilter/ipset/ip_set_hash_net.c
+++ b/net/netfilter/ipset/ip_set_hash_net.c
@@ -95,10 +95,10 @@ hash_net4_data_list(struct sk_buff *skb, const struct hash_net4_elem *data)
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -264,10 +264,10 @@ hash_net6_data_list(struct sk_buff *skb, const struct hash_net6_elem *data)
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_netiface.c b/net/netfilter/ipset/ip_set_hash_netiface.c
index 758b002..5a37ede 100644
--- a/net/netfilter/ipset/ip_set_hash_netiface.c
+++ b/net/netfilter/ipset/ip_set_hash_netiface.c
@@ -192,10 +192,10 @@ hash_netiface4_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -428,10 +428,10 @@ hash_netiface6_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_netport.c b/net/netfilter/ipset/ip_set_hash_netport.c
index c0ddb58..65abe45 100644
--- a/net/netfilter/ipset/ip_set_hash_netport.c
+++ b/net/netfilter/ipset/ip_set_hash_netport.c
@@ -110,10 +110,10 @@ hash_netport4_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -326,10 +326,10 @@ hash_netport6_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_netportnet.c b/net/netfilter/ipset/ip_set_hash_netportnet.c
index bfaa94c..8c80e84 100644
--- a/net/netfilter/ipset/ip_set_hash_netportnet.c
+++ b/net/netfilter/ipset/ip_set_hash_netportnet.c
@@ -124,10 +124,10 @@ hash_netportnet4_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -397,10 +397,10 @@ hash_netportnet6_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 29ba621..548537c 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -92,7 +92,7 @@ static inline bool already_closed(const struct nf_conn *conn)
 		return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT ||
 		       conn->proto.tcp.state == TCP_CONNTRACK_CLOSE;
 	else
-		return 0;
+		return false;
 }
 
 static int
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 1786968..09c3446 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -285,7 +285,7 @@ static int htable_create(struct net *net, struct xt_hashlimit_mtinfo1 *minfo,
 static bool select_all(const struct xt_hashlimit_htable *ht,
 		       const struct dsthash_ent *he)
 {
-	return 1;
+	return true;
 }
 
 static bool select_gc(const struct xt_hashlimit_htable *ht,
diff --git a/net/netfilter/xt_ipcomp.c b/net/netfilter/xt_ipcomp.c
index 89d5310..85b6a9d 100644
--- a/net/netfilter/xt_ipcomp.c
+++ b/net/netfilter/xt_ipcomp.c
@@ -56,7 +56,7 @@ static bool comp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 		 */
 		pr_debug("Dropping evil IPComp tinygram.\n");
 		par->hotdrop = true;
-		return 0;
+		return false;
 	}
 
 	return spi_match(compinfo->spis[0], compinfo->spis[1],
-- 
2.1.2


  parent reply	other threads:[~2015-03-30 23:49 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
2015-03-30 23:45 ` [Bridge] " Joe Perches
2015-03-30 23:45 ` Joe Perches
2015-03-30 23:45 ` Joe Perches
2015-03-30 23:45 ` Joe Perches
2015-03-30 23:45 ` Joe Perches
2015-03-30 23:45 ` [PATCH 01/25] arm: " Joe Perches
2015-03-30 23:45   ` Joe Perches
2015-03-31 15:54   ` Tony Lindgren
2015-03-31 15:54     ` Tony Lindgren
2015-03-31 15:58   ` Paolo Bonzini
2015-03-31 15:58     ` Paolo Bonzini
2015-03-31 16:05     ` Marc Zyngier
2015-03-31 16:05       ` Marc Zyngier
2015-03-31 16:05       ` Marc Zyngier
2015-03-30 23:46 ` [PATCH 02/25] arm64: " Joe Perches
2015-03-30 23:46   ` Joe Perches
2015-03-31 15:29   ` Will Deacon
2015-03-31 15:29     ` Will Deacon
2015-03-30 23:46 ` [PATCH 03/25] hexagon: " Joe Perches
2015-03-30 23:46 ` [PATCH 04/25] ia64: " Joe Perches
2015-03-30 23:46   ` Joe Perches
2015-03-30 23:46 ` [PATCH 05/25] mips: " Joe Perches
2015-03-30 23:46 ` [PATCH 06/25] powerpc: " Joe Perches
2015-03-30 23:46   ` Joe Perches
2015-03-30 23:46   ` Joe Perches
2015-03-31  1:49   ` Benjamin Herrenschmidt
2015-03-31  1:49     ` Benjamin Herrenschmidt
2015-03-31  1:49     ` Benjamin Herrenschmidt
2015-03-31  1:49     ` Benjamin Herrenschmidt
2015-03-31  1:57     ` Joe Perches
2015-03-31  1:57       ` Joe Perches
2015-03-31  1:57       ` Joe Perches
2015-03-30 23:46 ` [PATCH 07/25] s390: " Joe Perches
2015-03-31  7:13   ` Heiko Carstens
2015-03-30 23:46 ` [PATCH 08/25] sparc: " Joe Perches
2015-03-30 23:46   ` Joe Perches
2015-03-30 23:46 ` [PATCH 09/25] tile: " Joe Perches
2015-03-30 23:46 ` [PATCH 10/25] unicore32: " Joe Perches
2015-03-30 23:46 ` [PATCH 11/25] x86: " Joe Perches
2015-03-31 16:05   ` Paolo Bonzini
2015-03-30 23:46 ` [PATCH 12/25] virtio_console: " Joe Perches
2015-03-31  5:32   ` Amit Shah
2015-03-31  5:32     ` Amit Shah
2015-03-30 23:46 ` Joe Perches
2015-03-30 23:46 ` [PATCH 13/25] csiostor: " Joe Perches
2015-03-30 23:46 ` [PATCH 14/25] dcache: " Joe Perches
2015-03-30 23:46 ` [PATCH 15/25] nfsd: nfs4state: " Joe Perches
2015-03-30 23:46 ` [PATCH 16/25] include/linux: " Joe Perches
2015-03-30 23:46   ` Joe Perches
2015-03-31  7:41   ` Lee Jones
2015-03-31  7:41     ` Lee Jones
2015-03-31  7:41     ` Lee Jones
2015-04-06 19:39   ` Sebastian Reichel
2015-03-30 23:46 ` [PATCH 17/25] sound: " Joe Perches
2015-03-31  7:11   ` Mark Brown
2015-03-30 23:46 ` [PATCH 18/25] rcu: tree_plugin: " Joe Perches
2015-03-30 23:46 ` [PATCH 19/25] sched: " Joe Perches
2015-03-31  8:53   ` Peter Zijlstra
2015-03-31  9:03     ` Ingo Molnar
2015-03-31 16:46       ` Joe Perches
2015-04-01  6:58         ` Peter Zijlstra
2015-04-07  9:12         ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Ingo Molnar
2015-04-07  9:27           ` Ingo Molnar
2015-04-07  9:36           ` about the flood of trivial patches and the Code of Conflict " Ingo Molnar
2015-04-07  9:39             ` Ingo Molnar
2015-04-07 11:00           ` about the flood of trivial patches and the Code of Conduct " Greg Kroah-Hartman
2015-04-07 11:18             ` Ingo Molnar
2015-04-07 11:27               ` Peter Zijlstra
2015-04-07 13:21               ` about the flood of trivial patches and the Code of Conduct Peter Hurley
2015-04-07 11:28             ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Richard Weinberger
2015-04-07 11:32               ` Peter Zijlstra
2015-04-07 11:50                 ` about the flood of trivial patches and the Code of Conduct Richard Weinberger
2015-04-07 13:21                   ` Steven Rostedt
2015-04-07 13:28                     ` Richard Weinberger
2015-04-07 12:31                 ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Rafael J. Wysocki
2015-04-07 13:28                   ` Steven Rostedt
2015-04-08 23:37                     ` Rafael J. Wysocki
2015-04-09  0:04                       ` Joe Perches
2015-04-13 12:17                       ` One Thousand Gnomes
2015-04-08  3:22                 ` Theodore Ts'o
2015-04-07 12:35           ` Joe Perches
2015-03-31  9:09     ` [PATCH 19/25] sched: Use bool function return values of true/false not 1/0 Joe Perches
2015-04-01  5:17   ` Jason Low
2015-04-01  5:46     ` [PATCH V2 " Joe Perches
2015-03-30 23:46 ` [PATCH 20/25] ftrace: " Joe Perches
2015-03-30 23:46 ` [PATCH 21/25] slub: " Joe Perches
2015-03-30 23:46   ` Joe Perches
2015-04-01  3:29   ` David Rientjes
2015-04-01  3:29     ` David Rientjes
2015-03-30 23:46 ` [PATCH 22/25] bridge: " Joe Perches
2015-03-30 23:46   ` [Bridge] " Joe Perches
2015-03-30 23:46 ` Joe Perches [this message]
2015-03-31 16:58   ` [PATCH 23/25] netfilter: " Pablo Neira Ayuso
2015-03-30 23:46 ` [PATCH 24/25] security: " Joe Perches
2015-03-31  6:03   ` John Johansen
2015-03-30 23:46 ` [PATCH 25/25] sound: wm5100-tables: " Joe Perches
2015-04-01 11:54   ` Charles Keepax
2015-03-31  0:07 ` [PATCH 00/25] treewide: " Casey Schaufler
2015-03-31  0:07 ` Casey Schaufler
2015-03-31  0:07   ` [Bridge] " Casey Schaufler
2015-03-31  0:07   ` Casey Schaufler
2015-03-31  0:07   ` Casey Schaufler
2015-03-31  0:07   ` Casey Schaufler
2015-03-31  0:14   ` Joe Perches
2015-03-31  0:14   ` Joe Perches
2015-03-31  0:14     ` [Bridge] " Joe Perches
2015-03-31  0:14     ` Joe Perches
2015-03-31  0:14     ` Joe Perches
2015-03-31  0:14     ` Joe Perches
2015-03-31  0:14     ` Joe Perches
2015-03-31  0:14     ` Joe Perches

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=6f7ba321bbfe862cb7244664f2db08c430523ff3.1427759010.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=yoshfuji@linux-ipv6.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.