From 6fb0f6f4c6c5e17b9485fc666823feede35723b9 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 5 Apr 2011 01:50:23 +0200 Subject: Compare pointers to "NULL" instead of "0". "bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php. Signed-off-by: Lukas Fleischer --- src/utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index 8e4a447..d21debe 100644 --- a/src/utils.c +++ b/src/utils.c @@ -110,7 +110,7 @@ fatalbox (const char *errmsg) const int MSGLEN = WINCOL - 2; char msg[MSGLEN]; - if (errmsg == 0) + if (errmsg == NULL) return; (void)strncpy (msg, errmsg, MSGLEN); @@ -137,7 +137,7 @@ warnbox (const char *msg) const int MSGLEN = WINCOL - 2; char displmsg[MSGLEN]; - if (msg == 0) + if (msg == NULL) return; (void)strncpy (displmsg, msg, MSGLEN); @@ -405,7 +405,7 @@ updatestring (WINDOW *win, char **str, int x, int y) { len = strlen (buf); *str = mem_realloc (*str, len + 1, 1); - EXIT_IF (*str == 0, _("out of memory")); + EXIT_IF (*str == NULL, _("out of memory")); (void)memcpy (*str, buf, len + 1); } -- cgit v1.2.3-54-g00ecf