diff options
Diffstat (limited to 'net/tipc/name_distr.c')
-rw-r--r-- | net/tipc/name_distr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c index f2086f684b34..1b70d5d051d0 100644 --- a/net/tipc/name_distr.c +++ b/net/tipc/name_distr.c | |||
@@ -109,11 +109,9 @@ static void named_cluster_distribute(struct sk_buff *buf) | |||
109 | { | 109 | { |
110 | struct sk_buff *buf_copy; | 110 | struct sk_buff *buf_copy; |
111 | struct tipc_node *n_ptr; | 111 | struct tipc_node *n_ptr; |
112 | u32 n_num; | ||
113 | 112 | ||
114 | for (n_num = 1; n_num <= tipc_highest_node; n_num++) { | 113 | list_for_each_entry(n_ptr, &tipc_node_list, list) { |
115 | n_ptr = tipc_nodes[n_num]; | 114 | if (tipc_node_has_active_links(n_ptr)) { |
116 | if (n_ptr && tipc_node_has_active_links(n_ptr)) { | ||
117 | buf_copy = skb_copy(buf, GFP_ATOMIC); | 115 | buf_copy = skb_copy(buf, GFP_ATOMIC); |
118 | if (!buf_copy) | 116 | if (!buf_copy) |
119 | break; | 117 | break; |