]> granicus.if.org Git - ipset/commitdiff
netfilter: ipset: fix boolreturn.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Wed, 11 Feb 2015 12:33:05 +0000 (20:33 +0800)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Wed, 11 Mar 2015 19:05:09 +0000 (20:05 +0100)
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>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/net/netfilter/xt_set.c

index 6e2ab1178ceaa54f2fea59d96f7326df3a177ada..43ed031bd740878a48829cd66578c350a78e29d6 100644 (file)
@@ -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);
 }