diff options
author | Jan Engelhardt | 2007-07-08 07:16:00 +0200 |
---|---|---|
committer | David S. Miller | 2007-07-11 07:16:58 +0200 |
commit | ccb79bdce71f2c04cfa9bfcbaf4d37e2f963d684 (patch) | |
tree | 5f41d7d1daade309b96492301a6f973caba3a2a4 /net/netfilter/xt_limit.c | |
parent | [NETFILTER]: x_tables: switch xt_match->match to bool (diff) | |
download | kernel-qcow2-linux-ccb79bdce71f2c04cfa9bfcbaf4d37e2f963d684.tar.gz kernel-qcow2-linux-ccb79bdce71f2c04cfa9bfcbaf4d37e2f963d684.tar.xz kernel-qcow2-linux-ccb79bdce71f2c04cfa9bfcbaf4d37e2f963d684.zip |
[NETFILTER]: x_tables: switch xt_match->checkentry to bool
Switch the return type of match functions to boolean
Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_limit.c')
-rw-r--r-- | net/netfilter/xt_limit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c index 0cfe241a0493..2717aa65246a 100644 --- a/net/netfilter/xt_limit.c +++ b/net/netfilter/xt_limit.c @@ -98,7 +98,7 @@ user2credits(u_int32_t user) return (user * HZ * CREDITS_PER_JIFFY) / XT_LIMIT_SCALE; } -static int +static bool ipt_limit_checkentry(const char *tablename, const void *inf, const struct xt_match *match, @@ -112,7 +112,7 @@ ipt_limit_checkentry(const char *tablename, || user2credits(r->avg * r->burst) < user2credits(r->avg)) { printk("Overflow in xt_limit, try lower: %u/%u\n", r->avg, r->burst); - return 0; + return false; } /* For SMP, we only want to use one set of counters. */ @@ -125,7 +125,7 @@ ipt_limit_checkentry(const char *tablename, r->credit_cap = user2credits(r->avg * r->burst); /* Credits full. */ r->cost = user2credits(r->avg); } - return 1; + return true; } #ifdef CONFIG_COMPAT |