aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-04-05 01:50:23 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-04-05 09:27:04 +0200
commit6fb0f6f4c6c5e17b9485fc666823feede35723b9 (patch)
tree2330c32238bf13fe89a3b25cf76f9abbbf433e51 /src/utils.c
parentc4c7c8af5d4180905f1b1401a259ec8ce3c5ac75 (diff)
downloadcalcurse-6fb0f6f4c6c5e17b9485fc666823feede35723b9.tar.gz
calcurse-6fb0f6f4c6c5e17b9485fc666823feede35723b9.zip
Compare pointers to "NULL" instead of "0".
"bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 3 insertions, 3 deletions
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);
}