aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/netfilter/ebt_limit.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-03-19 17:16:42 +0100
committerJan Engelhardt <jengelh@medozas.de>2010-03-25 16:03:13 +0100
commitb0f38452ff73da7e9e0ddc68cd5c6b93c897ca0d (patch)
treefd1bbb75556c88a581fc9dfe9faa045578e468ff /net/bridge/netfilter/ebt_limit.c
parentnetfilter: xtables: untangle spaghetti if clauses in checkentry (diff)
downloadlinux-dev-b0f38452ff73da7e9e0ddc68cd5c6b93c897ca0d.tar.xz
linux-dev-b0f38452ff73da7e9e0ddc68cd5c6b93c897ca0d.zip
netfilter: xtables: change xt_match.checkentry return type
Restore function signatures from bool to int so that we can report memory allocation failures or similar using -ENOMEM rather than always having to pass -EINVAL back. This semantic patch may not be too precise (checking for functions that use xt_mtchk_param rather than functions referenced by xt_match.checkentry), but reviewed, it produced the intended result. // <smpl> @@ type bool; identifier check, par; @@ -bool check +int check (struct xt_mtchk_param *par) { ... } // </smpl> Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/bridge/netfilter/ebt_limit.c')
-rw-r--r--net/bridge/netfilter/ebt_limit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c
index 5b7330b62541..abfb0ecd7c17 100644
--- a/net/bridge/netfilter/ebt_limit.c
+++ b/net/bridge/netfilter/ebt_limit.c
@@ -65,7 +65,7 @@ user2credits(u_int32_t user)
return (user * HZ * CREDITS_PER_JIFFY) / EBT_LIMIT_SCALE;
}
-static bool ebt_limit_mt_check(const struct xt_mtchk_param *par)
+static int ebt_limit_mt_check(const struct xt_mtchk_param *par)
{
struct ebt_limit_info *info = par->matchinfo;