aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/user_reg.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2006-03-21 01:36:47 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 01:36:47 -0500
commit1fc54d8f49c1270c584803437fb7c0ac543588c1 (patch)
tree13bccf49154e57986a7e218e38d243912aaea6d1 /net/tipc/user_reg.c
parentedb2c34fb2683ff21c8a6bcc3e41c07a53601761 (diff)
[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>
Diffstat (limited to 'net/tipc/user_reg.c')
-rw-r--r--net/tipc/user_reg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/user_reg.c b/net/tipc/user_reg.c
index 106200d76587..3f3f933976e9 100644
--- a/net/tipc/user_reg.c
+++ b/net/tipc/user_reg.c
@@ -65,7 +65,7 @@ struct tipc_user {
65#define MAX_USERID 64 65#define MAX_USERID 64
66#define USER_LIST_SIZE ((MAX_USERID + 1) * sizeof(struct tipc_user)) 66#define USER_LIST_SIZE ((MAX_USERID + 1) * sizeof(struct tipc_user))
67 67
68static struct tipc_user *users = 0; 68static struct tipc_user *users = NULL;
69static u32 next_free_user = MAX_USERID + 1; 69static u32 next_free_user = MAX_USERID + 1;
70static spinlock_t reg_lock = SPIN_LOCK_UNLOCKED; 70static spinlock_t reg_lock = SPIN_LOCK_UNLOCKED;
71 71
@@ -149,7 +149,7 @@ void tipc_reg_stop(void)
149 reg_callback(&users[id]); 149 reg_callback(&users[id]);
150 } 150 }
151 kfree(users); 151 kfree(users);
152 users = 0; 152 users = NULL;
153} 153}
154 154
155/** 155/**