aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.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/bearer.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/bearer.c')
-rw-r--r--net/tipc/bearer.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 64dcb0f3a8b2..e213a8e54855 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -45,10 +45,10 @@
45 45
46#define MAX_ADDR_STR 32 46#define MAX_ADDR_STR 32
47 47
48static struct media *media_list = 0; 48static struct media *media_list = NULL;
49static u32 media_count = 0; 49static u32 media_count = 0;
50 50
51struct bearer *tipc_bearers = 0; 51struct bearer *tipc_bearers = NULL;
52 52
53/** 53/**
54 * media_name_valid - validate media name 54 * media_name_valid - validate media name
@@ -79,7 +79,7 @@ static struct media *media_find(const char *name)
79 if (!strcmp(m_ptr->name, name)) 79 if (!strcmp(m_ptr->name, name))
80 return m_ptr; 80 return m_ptr;
81 } 81 }
82 return 0; 82 return NULL;
83} 83}
84 84
85/** 85/**
@@ -287,7 +287,7 @@ static struct bearer *bearer_find(const char *name)
287 if (b_ptr->active && (!strcmp(b_ptr->publ.name, name))) 287 if (b_ptr->active && (!strcmp(b_ptr->publ.name, name)))
288 return b_ptr; 288 return b_ptr;
289 } 289 }
290 return 0; 290 return NULL;
291} 291}
292 292
293/** 293/**
@@ -307,7 +307,7 @@ struct bearer *tipc_bearer_find_interface(const char *if_name)
307 if (!strcmp(b_if_name, if_name)) 307 if (!strcmp(b_if_name, if_name))
308 return b_ptr; 308 return b_ptr;
309 } 309 }
310 return 0; 310 return NULL;
311} 311}
312 312
313/** 313/**
@@ -569,7 +569,7 @@ failed:
569 569
570int tipc_block_bearer(const char *name) 570int tipc_block_bearer(const char *name)
571{ 571{
572 struct bearer *b_ptr = 0; 572 struct bearer *b_ptr = NULL;
573 struct link *l_ptr; 573 struct link *l_ptr;
574 struct link *temp_l_ptr; 574 struct link *temp_l_ptr;
575 575
@@ -666,8 +666,8 @@ int tipc_bearer_init(void)
666 } else { 666 } else {
667 kfree(tipc_bearers); 667 kfree(tipc_bearers);
668 kfree(media_list); 668 kfree(media_list);
669 tipc_bearers = 0; 669 tipc_bearers = NULL;
670 media_list = 0; 670 media_list = NULL;
671 res = -ENOMEM; 671 res = -ENOMEM;
672 } 672 }
673 write_unlock_bh(&tipc_net_lock); 673 write_unlock_bh(&tipc_net_lock);
@@ -691,8 +691,8 @@ void tipc_bearer_stop(void)
691 } 691 }
692 kfree(tipc_bearers); 692 kfree(tipc_bearers);
693 kfree(media_list); 693 kfree(media_list);
694 tipc_bearers = 0; 694 tipc_bearers = NULL;
695 media_list = 0; 695 media_list = NULL;
696 media_count = 0; 696 media_count = 0;
697} 697}
698 698