From: kbuild test robot Date: Wed, 11 Feb 2015 12:33:05 +0000 (+0800) Subject: netfilter: ipset: fix boolreturn.cocci warnings X-Git-Tag: pablo~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fee333d674a4c697c1f33952bbc060ee810d9307;p=thirdparty%2Fipset.git 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 Signed-off-by: Fengguang Wu Signed-off-by: Jozsef Kadlecsik --- diff --git a/kernel/net/netfilter/xt_set.c b/kernel/net/netfilter/xt_set.c index 6e2ab117..43ed031b 100644 --- a/kernel/net/netfilter/xt_set.c +++ b/kernel/net/netfilter/xt_set.c @@ -214,7 +214,7 @@ set_match_v3(const struct sk_buff *skb, CONST struct xt_action_param *par) return ret; if (!match_counter0(opt.ext.packets, &info->packets)) - return 0; + return false; return match_counter0(opt.ext.bytes, &info->bytes); } @@ -260,7 +260,7 @@ set_match_v4(const struct sk_buff *skb, CONST struct xt_action_param *par) return ret; if (!match_counter(opt.ext.packets, &info->packets)) - return 0; + return false; return match_counter(opt.ext.bytes, &info->bytes); }