diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2006-03-21 01:36:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:36:47 -0500 |
commit | 1fc54d8f49c1270c584803437fb7c0ac543588c1 (patch) | |
tree | 13bccf49154e57986a7e218e38d243912aaea6d1 /net/tipc/eth_media.c | |
parent | edb2c34fb2683ff21c8a6bcc3e41c07a53601761 (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/eth_media.c')
-rw-r--r-- | net/tipc/eth_media.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index 1f8d83b9c8b4..7a252785f727 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c | |||
@@ -169,7 +169,7 @@ static int enable_bearer(struct tipc_bearer *tb_ptr) | |||
169 | 169 | ||
170 | static void disable_bearer(struct tipc_bearer *tb_ptr) | 170 | static void disable_bearer(struct tipc_bearer *tb_ptr) |
171 | { | 171 | { |
172 | ((struct eth_bearer *)tb_ptr->usr_handle)->bearer = 0; | 172 | ((struct eth_bearer *)tb_ptr->usr_handle)->bearer = NULL; |
173 | } | 173 | } |
174 | 174 | ||
175 | /** | 175 | /** |
@@ -285,7 +285,7 @@ void tipc_eth_media_stop(void) | |||
285 | for (i = 0; i < MAX_ETH_BEARERS ; i++) { | 285 | for (i = 0; i < MAX_ETH_BEARERS ; i++) { |
286 | if (eth_bearers[i].bearer) { | 286 | if (eth_bearers[i].bearer) { |
287 | eth_bearers[i].bearer->blocked = 1; | 287 | eth_bearers[i].bearer->blocked = 1; |
288 | eth_bearers[i].bearer = 0; | 288 | eth_bearers[i].bearer = NULL; |
289 | } | 289 | } |
290 | if (eth_bearers[i].dev) { | 290 | if (eth_bearers[i].dev) { |
291 | dev_remove_pack(ð_bearers[i].tipc_packet_type); | 291 | dev_remove_pack(ð_bearers[i].tipc_packet_type); |