[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>
This commit is contained in:

committed by
David S. Miller

parent
edb2c34fb2
commit
1fc54d8f49
@@ -81,7 +81,7 @@ void tipc_printbuf_init(struct print_buf *pb, char *raw, u32 sz)
|
||||
|
||||
pb->crs = pb->buf = raw;
|
||||
pb->size = sz;
|
||||
pb->next = 0;
|
||||
pb->next = NULL;
|
||||
pb->buf[0] = 0;
|
||||
pb->buf[sz-1] = ~0;
|
||||
}
|
||||
@@ -216,7 +216,7 @@ void tipc_printf(struct print_buf *pb, const char *fmt, ...)
|
||||
}
|
||||
}
|
||||
pb_next = pb->next;
|
||||
pb->next = 0;
|
||||
pb->next = NULL;
|
||||
pb = pb_next;
|
||||
}
|
||||
spin_unlock_bh(&print_lock);
|
||||
|
Reference in New Issue
Block a user