netfilter: ipset: Add hash: fix coccinelle warnings
authorFengguang Wu <fengguang.wu@intel.com>
Fri, 27 Dec 2013 10:13:03 +0000 (11:13 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 6 Mar 2014 08:31:42 +0000 (09:31 +0100)
net/netfilter/ipset/ip_set_hash_netnet.c:115:8-9: WARNING: return of 0/1 in function 'hash_netnet4_data_list' with return type bool
/c/kernel-tests/src/cocci/net/netfilter/ipset/ip_set_hash_netnet.c:338:8-9: WARNING: return of 0/1 in function 'hash_netnet6_data_list' with return type bool

Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: coccinelle/misc/boolreturn.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
net/netfilter/ipset/ip_set_hash_netnet.c

index 6226803fc490ce33c53994c344a1c034b9b0cce9..4e7261df8961b5fa94b507a4cd6c9b365c7c19b2 100644 (file)
@@ -112,10 +112,10 @@ hash_netnet4_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
@@ -334,10 +334,10 @@ hash_netnet6_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
This page took 0.040072 seconds and 5 git commands to generate.