diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2008-10-08 05:35:00 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 05:35:00 -0400 |
commit | 76108cea065cda58366d16a7eb6ca90d717a1396 (patch) | |
tree | c4fc31d490c902f2c2478a6344ee988dccc6286f /net/netfilter/xt_hashlimit.c | |
parent | be713a443ee019489890e93654557916fbf72612 (diff) |
netfilter: Use unsigned types for hooknum and pf vars
and (try to) consistently use u_int8_t for the L3 family.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/xt_hashlimit.c')
-rw-r--r-- | net/netfilter/xt_hashlimit.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index d9418a26781..0c9268fd2e1 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
@@ -80,7 +80,7 @@ struct dsthash_ent { | |||
80 | struct xt_hashlimit_htable { | 80 | struct xt_hashlimit_htable { |
81 | struct hlist_node node; /* global list of all htables */ | 81 | struct hlist_node node; /* global list of all htables */ |
82 | atomic_t use; | 82 | atomic_t use; |
83 | int family; | 83 | u_int8_t family; |
84 | 84 | ||
85 | struct hashlimit_cfg1 cfg; /* config */ | 85 | struct hashlimit_cfg1 cfg; /* config */ |
86 | 86 | ||
@@ -185,7 +185,7 @@ dsthash_free(struct xt_hashlimit_htable *ht, struct dsthash_ent *ent) | |||
185 | } | 185 | } |
186 | static void htable_gc(unsigned long htlong); | 186 | static void htable_gc(unsigned long htlong); |
187 | 187 | ||
188 | static int htable_create_v0(struct xt_hashlimit_info *minfo, int family) | 188 | static int htable_create_v0(struct xt_hashlimit_info *minfo, u_int8_t family) |
189 | { | 189 | { |
190 | struct xt_hashlimit_htable *hinfo; | 190 | struct xt_hashlimit_htable *hinfo; |
191 | unsigned int size; | 191 | unsigned int size; |
@@ -258,8 +258,7 @@ static int htable_create_v0(struct xt_hashlimit_info *minfo, int family) | |||
258 | return 0; | 258 | return 0; |
259 | } | 259 | } |
260 | 260 | ||
261 | static int htable_create(struct xt_hashlimit_mtinfo1 *minfo, | 261 | static int htable_create(struct xt_hashlimit_mtinfo1 *minfo, u_int8_t family) |
262 | unsigned int family) | ||
263 | { | 262 | { |
264 | struct xt_hashlimit_htable *hinfo; | 263 | struct xt_hashlimit_htable *hinfo; |
265 | unsigned int size; | 264 | unsigned int size; |
@@ -378,7 +377,7 @@ static void htable_destroy(struct xt_hashlimit_htable *hinfo) | |||
378 | } | 377 | } |
379 | 378 | ||
380 | static struct xt_hashlimit_htable *htable_find_get(const char *name, | 379 | static struct xt_hashlimit_htable *htable_find_get(const char *name, |
381 | int family) | 380 | u_int8_t family) |
382 | { | 381 | { |
383 | struct xt_hashlimit_htable *hinfo; | 382 | struct xt_hashlimit_htable *hinfo; |
384 | struct hlist_node *pos; | 383 | struct hlist_node *pos; |
@@ -901,7 +900,7 @@ static void dl_seq_stop(struct seq_file *s, void *v) | |||
901 | spin_unlock_bh(&htable->lock); | 900 | spin_unlock_bh(&htable->lock); |
902 | } | 901 | } |
903 | 902 | ||
904 | static int dl_seq_real_show(struct dsthash_ent *ent, int family, | 903 | static int dl_seq_real_show(struct dsthash_ent *ent, u_int8_t family, |
905 | struct seq_file *s) | 904 | struct seq_file *s) |
906 | { | 905 | { |
907 | /* recalculate to show accurate numbers */ | 906 | /* recalculate to show accurate numbers */ |