Commit 5f2f40a92e007ec5b503db20f3f70cb331c64f65

Authored by Harvey Harrison
Committed by David S. Miller
1 parent 323dbaba2c

tipc: fix integer as NULL pointer sparse warnings in tipc

net/tipc/cluster.c:145:2: warning: Using plain integer as NULL pointer
net/tipc/link.c:3254:36: warning: Using plain integer as NULL pointer
net/tipc/ref.c:151:15: warning: Using plain integer as NULL pointer
net/tipc/zone.c:85:2: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 4 changed files with 4 additions and 4 deletions Side-by-side Diff

... ... @@ -142,7 +142,7 @@
142 142 max_n_num = tipc_highest_allowed_slave;
143 143 assert(n_num > 0);
144 144 assert(n_num <= max_n_num);
145   - assert(c_ptr->nodes[n_num] == 0);
  145 + assert(c_ptr->nodes[n_num] == NULL);
146 146 c_ptr->nodes[n_num] = n_ptr;
147 147 if (n_num > c_ptr->highest_node)
148 148 c_ptr->highest_node = n_num;
... ... @@ -3251,7 +3251,7 @@
3251 3251 if ((mod(msg_seqno(buf_msg(l_ptr->last_out)) -
3252 3252 msg_seqno(buf_msg(l_ptr->first_out)))
3253 3253 != (l_ptr->out_queue_size - 1))
3254   - || (l_ptr->last_out->next != 0)) {
  3254 + || (l_ptr->last_out->next != NULL)) {
3255 3255 tipc_printf(buf, "\nSend queue inconsistency\n");
3256 3256 tipc_printf(buf, "first_out= %x ", l_ptr->first_out);
3257 3257 tipc_printf(buf, "next_out= %x ", l_ptr->next_out);
... ... @@ -148,7 +148,7 @@
148 148 reference = (next_plus_upper & ~index_mask) + index;
149 149 entry->data.reference = reference;
150 150 entry->object = object;
151   - if (lock != 0)
  151 + if (lock != NULL)
152 152 *lock = &entry->lock;
153 153 spin_unlock_bh(&entry->lock);
154 154 }
... ... @@ -82,7 +82,7 @@
82 82  
83 83 assert(c_ptr->addr);
84 84 assert(c_num <= tipc_max_clusters);
85   - assert(z_ptr->clusters[c_num] == 0);
  85 + assert(z_ptr->clusters[c_num] == NULL);
86 86 z_ptr->clusters[c_num] = c_ptr;
87 87 }
88 88