diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2015-02-11 07:33:05 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-02-11 10:13:30 -0500 |
commit | 7f73b9f1ca7334eec0ff9a40e37ece92dd3e420f (patch) | |
tree | 2469815d18ac67a6943fe6a7f0e71cf2675f96a1 | |
parent | 5cca4ace0fac4474edb02120bf1284ed6eb059aa (diff) |
netfilter: ipset: fix boolreturn.cocci warnings
net/netfilter/xt_set.c:196:9-10: WARNING: return of 0/1 in function 'set_match_v3' with return type bool
net/netfilter/xt_set.c:242:9-10: WARNING: return of 0/1 in function 'set_match_v4' 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: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/netfilter/xt_set.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/xt_set.c b/net/netfilter/xt_set.c index 0d47afea9682..89045982ec94 100644 --- a/net/netfilter/xt_set.c +++ b/net/netfilter/xt_set.c | |||
@@ -193,7 +193,7 @@ set_match_v3(const struct sk_buff *skb, struct xt_action_param *par) | |||
193 | return ret; | 193 | return ret; |
194 | 194 | ||
195 | if (!match_counter0(opt.ext.packets, &info->packets)) | 195 | if (!match_counter0(opt.ext.packets, &info->packets)) |
196 | return 0; | 196 | return false; |
197 | return match_counter0(opt.ext.bytes, &info->bytes); | 197 | return match_counter0(opt.ext.bytes, &info->bytes); |
198 | } | 198 | } |
199 | 199 | ||
@@ -239,7 +239,7 @@ set_match_v4(const struct sk_buff *skb, struct xt_action_param *par) | |||
239 | return ret; | 239 | return ret; |
240 | 240 | ||
241 | if (!match_counter(opt.ext.packets, &info->packets)) | 241 | if (!match_counter(opt.ext.packets, &info->packets)) |
242 | return 0; | 242 | return false; |
243 | return match_counter(opt.ext.bytes, &info->bytes); | 243 | return match_counter(opt.ext.bytes, &info->bytes); |
244 | } | 244 | } |
245 | 245 | ||