[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>
This commit is contained in:

committed by
David S. Miller

parent
de83c058af
commit
cfcabdcc2d
@@ -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) {
|
||||
|
Reference in New Issue
Block a user