diff options
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 6d65010e5fa1..0d5db06e203f 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -155,7 +155,7 @@ static void node_select_active_links(struct node *n_ptr) | |||
155 | u32 i; | 155 | u32 i; |
156 | u32 highest_prio = 0; | 156 | u32 highest_prio = 0; |
157 | 157 | ||
158 | active[0] = active[1] = 0; | 158 | active[0] = active[1] = NULL; |
159 | 159 | ||
160 | for (i = 0; i < MAX_BEARERS; i++) { | 160 | for (i = 0; i < MAX_BEARERS; i++) { |
161 | struct link *l_ptr = n_ptr->links[i]; | 161 | struct link *l_ptr = n_ptr->links[i]; |
@@ -214,7 +214,7 @@ int tipc_node_has_redundant_links(struct node *n_ptr) | |||
214 | (n_ptr->active_links[0] != n_ptr->active_links[1])); | 214 | (n_ptr->active_links[0] != n_ptr->active_links[1])); |
215 | } | 215 | } |
216 | 216 | ||
217 | int tipc_node_has_active_routes(struct node *n_ptr) | 217 | static int tipc_node_has_active_routes(struct node *n_ptr) |
218 | { | 218 | { |
219 | return (n_ptr && (n_ptr->last_router >= 0)); | 219 | return (n_ptr && (n_ptr->last_router >= 0)); |
220 | } | 220 | } |
@@ -240,7 +240,7 @@ struct node *tipc_node_attach_link(struct link *l_ptr) | |||
240 | 240 | ||
241 | err("Attempt to create third link to %s\n", | 241 | err("Attempt to create third link to %s\n", |
242 | addr_string_fill(addr_string, n_ptr->addr)); | 242 | addr_string_fill(addr_string, n_ptr->addr)); |
243 | return 0; | 243 | return NULL; |
244 | } | 244 | } |
245 | 245 | ||
246 | if (!n_ptr->links[bearer_id]) { | 246 | if (!n_ptr->links[bearer_id]) { |
@@ -253,12 +253,12 @@ struct node *tipc_node_attach_link(struct link *l_ptr) | |||
253 | l_ptr->b_ptr->publ.name, | 253 | l_ptr->b_ptr->publ.name, |
254 | addr_string_fill(addr_string, l_ptr->addr)); | 254 | addr_string_fill(addr_string, l_ptr->addr)); |
255 | } | 255 | } |
256 | return 0; | 256 | return NULL; |
257 | } | 257 | } |
258 | 258 | ||
259 | void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr) | 259 | void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr) |
260 | { | 260 | { |
261 | n_ptr->links[l_ptr->b_ptr->identity] = 0; | 261 | n_ptr->links[l_ptr->b_ptr->identity] = NULL; |
262 | tipc_net.zones[tipc_zone(l_ptr->addr)]->links--; | 262 | tipc_net.zones[tipc_zone(l_ptr->addr)]->links--; |
263 | n_ptr->link_cnt--; | 263 | n_ptr->link_cnt--; |
264 | } | 264 | } |
@@ -424,7 +424,7 @@ static void node_lost_contact(struct node *n_ptr) | |||
424 | 424 | ||
425 | /* Notify subscribers */ | 425 | /* Notify subscribers */ |
426 | list_for_each_entry_safe(ns, tns, &n_ptr->nsub, nodesub_list) { | 426 | list_for_each_entry_safe(ns, tns, &n_ptr->nsub, nodesub_list) { |
427 | ns->node = 0; | 427 | ns->node = NULL; |
428 | list_del_init(&ns->nodesub_list); | 428 | list_del_init(&ns->nodesub_list); |
429 | tipc_k_signal((Handler)ns->handle_node_down, | 429 | tipc_k_signal((Handler)ns->handle_node_down, |
430 | (unsigned long)ns->usr_handle); | 430 | (unsigned long)ns->usr_handle); |
@@ -443,7 +443,7 @@ struct node *tipc_node_select_next_hop(u32 addr, u32 selector) | |||
443 | u32 router_addr; | 443 | u32 router_addr; |
444 | 444 | ||
445 | if (!tipc_addr_domain_valid(addr)) | 445 | if (!tipc_addr_domain_valid(addr)) |
446 | return 0; | 446 | return NULL; |
447 | 447 | ||
448 | /* Look for direct link to destination processsor */ | 448 | /* Look for direct link to destination processsor */ |
449 | n_ptr = tipc_node_find(addr); | 449 | n_ptr = tipc_node_find(addr); |
@@ -452,7 +452,7 @@ struct node *tipc_node_select_next_hop(u32 addr, u32 selector) | |||
452 | 452 | ||
453 | /* Cluster local system nodes *must* have direct links */ | 453 | /* Cluster local system nodes *must* have direct links */ |
454 | if (!is_slave(addr) && in_own_cluster(addr)) | 454 | if (!is_slave(addr) && in_own_cluster(addr)) |
455 | return 0; | 455 | return NULL; |
456 | 456 | ||
457 | /* Look for cluster local router with direct link to node */ | 457 | /* Look for cluster local router with direct link to node */ |
458 | router_addr = tipc_node_select_router(n_ptr, selector); | 458 | router_addr = tipc_node_select_router(n_ptr, selector); |
@@ -462,7 +462,7 @@ struct node *tipc_node_select_next_hop(u32 addr, u32 selector) | |||
462 | /* Slave nodes can only be accessed within own cluster via a | 462 | /* Slave nodes can only be accessed within own cluster via a |
463 | known router with direct link -- if no router was found,give up */ | 463 | known router with direct link -- if no router was found,give up */ |
464 | if (is_slave(addr)) | 464 | if (is_slave(addr)) |
465 | return 0; | 465 | return NULL; |
466 | 466 | ||
467 | /* Inter zone/cluster -- find any direct link to remote cluster */ | 467 | /* Inter zone/cluster -- find any direct link to remote cluster */ |
468 | addr = tipc_addr(tipc_zone(addr), tipc_cluster(addr), 0); | 468 | addr = tipc_addr(tipc_zone(addr), tipc_cluster(addr), 0); |
@@ -475,7 +475,7 @@ struct node *tipc_node_select_next_hop(u32 addr, u32 selector) | |||
475 | if (router_addr) | 475 | if (router_addr) |
476 | return tipc_node_select(router_addr, selector); | 476 | return tipc_node_select(router_addr, selector); |
477 | 477 | ||
478 | return 0; | 478 | return NULL; |
479 | } | 479 | } |
480 | 480 | ||
481 | /** | 481 | /** |