diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-10-09 01:59:42 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 16:54:48 -0700 |
commit | cfcabdcc2d5a810208e5bb3974121b7ed60119aa (patch) | |
tree | 1aed711eeecc5a303b57f1fc47e1b5746e8a72c2 /net/ipv4/route.c | |
parent | de83c058af25aa97ed4864abab11e90e8dead6e2 (diff) | |
download | kernel-common-cfcabdcc2d5a810208e5bb3974121b7ed60119aa.tar.gz kernel-common-cfcabdcc2d5a810208e5bb3974121b7ed60119aa.tar.bz2 kernel-common-cfcabdcc2d5a810208e5bb3974121b7ed60119aa.zip |
[NET]: sparse warning fixes
Fix a bunch of sparse warnings. Mostly about 0 used as
NULL pointer, and shadowed variable declarations.
One notable case was that hash size should have been unsigned.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 2a9b363e820c..307e1f1107ca 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -246,7 +246,7 @@ static spinlock_t *rt_hash_locks; static struct rt_hash_bucket *rt_hash_table; static unsigned rt_hash_mask; -static int rt_hash_log; +static unsigned int rt_hash_log; static unsigned int rt_hash_rnd; static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat); @@ -593,7 +593,7 @@ static void rt_check_expire(struct work_struct *work) i = (i + 1) & rt_hash_mask; rthp = &rt_hash_table[i].chain; - if (*rthp == 0) + if (*rthp == NULL) continue; spin_lock_bh(rt_hash_lock_addr(i)); while ((rth = *rthp) != NULL) { |