diff options
Diffstat (limited to 'net/tipc/cluster.c')
-rw-r--r-- | net/tipc/cluster.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/tipc/cluster.c b/net/tipc/cluster.c index ab974ca19371..9fe45a4837df 100644 --- a/net/tipc/cluster.c +++ b/net/tipc/cluster.c | |||
@@ -48,7 +48,7 @@ void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, | |||
48 | u32 lower, u32 upper); | 48 | u32 lower, u32 upper); |
49 | struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest); | 49 | struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest); |
50 | 50 | ||
51 | struct node **tipc_local_nodes = 0; | 51 | struct node **tipc_local_nodes = NULL; |
52 | struct node_map tipc_cltr_bcast_nodes = {0,{0,}}; | 52 | struct node_map tipc_cltr_bcast_nodes = {0,{0,}}; |
53 | u32 tipc_highest_allowed_slave = 0; | 53 | u32 tipc_highest_allowed_slave = 0; |
54 | 54 | ||
@@ -61,7 +61,7 @@ struct cluster *tipc_cltr_create(u32 addr) | |||
61 | 61 | ||
62 | c_ptr = (struct cluster *)kmalloc(sizeof(*c_ptr), GFP_ATOMIC); | 62 | c_ptr = (struct cluster *)kmalloc(sizeof(*c_ptr), GFP_ATOMIC); |
63 | if (c_ptr == NULL) | 63 | if (c_ptr == NULL) |
64 | return 0; | 64 | return NULL; |
65 | memset(c_ptr, 0, sizeof(*c_ptr)); | 65 | memset(c_ptr, 0, sizeof(*c_ptr)); |
66 | 66 | ||
67 | c_ptr->addr = tipc_addr(tipc_zone(addr), tipc_cluster(addr), 0); | 67 | c_ptr->addr = tipc_addr(tipc_zone(addr), tipc_cluster(addr), 0); |
@@ -73,7 +73,7 @@ struct cluster *tipc_cltr_create(u32 addr) | |||
73 | c_ptr->nodes = (struct node **)kmalloc(alloc, GFP_ATOMIC); | 73 | c_ptr->nodes = (struct node **)kmalloc(alloc, GFP_ATOMIC); |
74 | if (c_ptr->nodes == NULL) { | 74 | if (c_ptr->nodes == NULL) { |
75 | kfree(c_ptr); | 75 | kfree(c_ptr); |
76 | return 0; | 76 | return NULL; |
77 | } | 77 | } |
78 | memset(c_ptr->nodes, 0, alloc); | 78 | memset(c_ptr->nodes, 0, alloc); |
79 | if (in_own_cluster(addr)) | 79 | if (in_own_cluster(addr)) |
@@ -91,7 +91,7 @@ struct cluster *tipc_cltr_create(u32 addr) | |||
91 | } | 91 | } |
92 | else { | 92 | else { |
93 | kfree(c_ptr); | 93 | kfree(c_ptr); |
94 | c_ptr = 0; | 94 | c_ptr = NULL; |
95 | } | 95 | } |
96 | 96 | ||
97 | return c_ptr; | 97 | return c_ptr; |
@@ -204,7 +204,7 @@ struct node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector) | |||
204 | 204 | ||
205 | assert(!in_own_cluster(c_ptr->addr)); | 205 | assert(!in_own_cluster(c_ptr->addr)); |
206 | if (!c_ptr->highest_node) | 206 | if (!c_ptr->highest_node) |
207 | return 0; | 207 | return NULL; |
208 | 208 | ||
209 | /* Start entry must be random */ | 209 | /* Start entry must be random */ |
210 | while (mask > c_ptr->highest_node) { | 210 | while (mask > c_ptr->highest_node) { |
@@ -222,7 +222,7 @@ struct node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector) | |||
222 | if (tipc_node_has_active_links(c_ptr->nodes[n_num])) | 222 | if (tipc_node_has_active_links(c_ptr->nodes[n_num])) |
223 | return c_ptr->nodes[n_num]; | 223 | return c_ptr->nodes[n_num]; |
224 | } | 224 | } |
225 | return 0; | 225 | return NULL; |
226 | } | 226 | } |
227 | 227 | ||
228 | /* | 228 | /* |