diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2006-03-20 22:36:47 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-20 22:36:47 -0800 |
commit | 1fc54d8f49c1270c584803437fb7c0ac543588c1 (patch) | |
tree | 13bccf49154e57986a7e218e38d243912aaea6d1 /net/tipc/subscr.c | |
parent | edb2c34fb2683ff21c8a6bcc3e41c07a53601761 (diff) | |
download | linux-3.10-1fc54d8f49c1270c584803437fb7c0ac543588c1.tar.gz linux-3.10-1fc54d8f49c1270c584803437fb7c0ac543588c1.tar.bz2 linux-3.10-1fc54d8f49c1270c584803437fb7c0ac543588c1.zip |
[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/subscr.c')
-rw-r--r-- | net/tipc/subscr.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index 5ff38b9f319..3ec4e2b4e75 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c @@ -381,7 +381,7 @@ static void subscr_named_msg_event(void *usr_handle, struct tipc_name_seq const *dest) { struct subscriber *subscriber; - struct iovec msg_sect = {0, 0}; + struct iovec msg_sect = {NULL, 0}; spinlock_t *subscriber_lock; dbg("subscr_named_msg_event: orig = %x own = %x,\n", @@ -413,13 +413,13 @@ static void subscr_named_msg_event(void *usr_handle, tipc_createport(topsrv.user_ref, (void *)(unsigned long)subscriber->ref, importance, - 0, - 0, + NULL, + NULL, subscr_conn_shutdown_event, - 0, - 0, + NULL, + NULL, subscr_conn_msg_event, - 0, + NULL, &subscriber->port_ref); if (subscriber->port_ref == 0) { warn("Memory squeeze; failed to create subscription port\n"); @@ -461,22 +461,22 @@ int tipc_subscr_start(void) INIT_LIST_HEAD(&topsrv.subscriber_list); spin_lock_bh(&topsrv.lock); - res = tipc_attach(&topsrv.user_ref, 0, 0); + res = tipc_attach(&topsrv.user_ref, NULL, NULL); if (res) { spin_unlock_bh(&topsrv.lock); return res; } res = tipc_createport(topsrv.user_ref, - 0, + NULL, TIPC_CRITICAL_IMPORTANCE, - 0, - 0, - 0, - 0, + NULL, + NULL, + NULL, + NULL, subscr_named_msg_event, - 0, - 0, + NULL, + NULL, &topsrv.setup_port); if (res) goto failed; |