diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-01-31 07:07:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-31 22:27:44 -0500 |
commit | 96eb24d770381b8a257b26183f6b6c131ad51ab9 (patch) | |
tree | 77b7404c94e3aaad43d45d679b6eeb3aadc1edb1 /net | |
parent | 06aa10728e36265cce82a53de025ad1aa672b2b0 (diff) |
[NETFILTER]: nf_conntrack: sparse warnings
The hashtable size is really unsigned so sparse complains when you pass
a signed integer. Change all uses to make it consistent.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 078fff0335ad..7b1f7e80f2f8 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -939,7 +939,7 @@ static int kill_all(struct nf_conn *i, void *data) | |||
939 | return 1; | 939 | return 1; |
940 | } | 940 | } |
941 | 941 | ||
942 | void nf_ct_free_hashtable(struct hlist_head *hash, int vmalloced, int size) | 942 | void nf_ct_free_hashtable(struct hlist_head *hash, int vmalloced, unsigned int size) |
943 | { | 943 | { |
944 | if (vmalloced) | 944 | if (vmalloced) |
945 | vfree(hash); | 945 | vfree(hash); |
@@ -988,7 +988,7 @@ void nf_conntrack_cleanup(void) | |||
988 | nf_conntrack_expect_fini(); | 988 | nf_conntrack_expect_fini(); |
989 | } | 989 | } |
990 | 990 | ||
991 | struct hlist_head *nf_ct_alloc_hashtable(int *sizep, int *vmalloced) | 991 | struct hlist_head *nf_ct_alloc_hashtable(unsigned int *sizep, int *vmalloced) |
992 | { | 992 | { |
993 | struct hlist_head *hash; | 993 | struct hlist_head *hash; |
994 | unsigned int size, i; | 994 | unsigned int size, i; |
@@ -1015,8 +1015,8 @@ EXPORT_SYMBOL_GPL(nf_ct_alloc_hashtable); | |||
1015 | 1015 | ||
1016 | int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp) | 1016 | int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp) |
1017 | { | 1017 | { |
1018 | int i, bucket, hashsize, vmalloced; | 1018 | int i, bucket, vmalloced, old_vmalloced; |
1019 | int old_vmalloced, old_size; | 1019 | unsigned int hashsize, old_size; |
1020 | int rnd; | 1020 | int rnd; |
1021 | struct hlist_head *hash, *old_hash; | 1021 | struct hlist_head *hash, *old_hash; |
1022 | struct nf_conntrack_tuple_hash *h; | 1022 | struct nf_conntrack_tuple_hash *h; |
@@ -1025,7 +1025,7 @@ int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp) | |||
1025 | if (!nf_conntrack_htable_size) | 1025 | if (!nf_conntrack_htable_size) |
1026 | return param_set_uint(val, kp); | 1026 | return param_set_uint(val, kp); |
1027 | 1027 | ||
1028 | hashsize = simple_strtol(val, NULL, 0); | 1028 | hashsize = simple_strtoul(val, NULL, 0); |
1029 | if (!hashsize) | 1029 | if (!hashsize) |
1030 | return -EINVAL; | 1030 | return -EINVAL; |
1031 | 1031 | ||