[TIPC]: Fix simple sparse warnings
Tried to run the new tipc stack through sparse. Following patch fixes all cases where 0 was used as replacement of NULL. Use NULL to document this is a pointer and to silence sparse. This brough sparse warning count down with 127 to 24 warnings. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Per Liden <per.liden@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
edb2c34fb2
commit
1fc54d8f49
@@ -65,7 +65,7 @@ struct tipc_user {
|
||||
#define MAX_USERID 64
|
||||
#define USER_LIST_SIZE ((MAX_USERID + 1) * sizeof(struct tipc_user))
|
||||
|
||||
static struct tipc_user *users = 0;
|
||||
static struct tipc_user *users = NULL;
|
||||
static u32 next_free_user = MAX_USERID + 1;
|
||||
static spinlock_t reg_lock = SPIN_LOCK_UNLOCKED;
|
||||
|
||||
@@ -149,7 +149,7 @@ void tipc_reg_stop(void)
|
||||
reg_callback(&users[id]);
|
||||
}
|
||||
kfree(users);
|
||||
users = 0;
|
||||
users = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user