Skip to content

Commit

Permalink
netfilter: ipset: fix boolreturn.cocci warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wu Fengguang authored and Pablo Neira Ayuso committed Feb 11, 2015
1 parent 5cca4ac commit 7f73b9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/netfilter/xt_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ set_match_v3(const struct sk_buff *skb, 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);
}

Expand Down Expand Up @@ -239,7 +239,7 @@ set_match_v4(const struct sk_buff *skb, 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);
}

Expand Down

0 comments on commit 7f73b9f

Please sign in to comment.