From ce3f0ce76f59216ff82ecd79e180a5c59d3d60d0 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 2 Nov 2011 18:59:40 +0100 Subject: Make use of the NULL macro Use this constant everywhere when referring to a null pointer instead of casting 0 to various types of pointers. Created using following semantic patch: @@ type type; @@ - (type *)0 + NULL Signed-off-by: Lukas Fleischer --- src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index ca2ebfe..d4390cd 100644 --- a/src/utils.c +++ b/src/utils.c @@ -419,7 +419,7 @@ item_in_popup (char *saved_a_start, char *saved_a_end, char *msg, const int padl = winl - 2, padw = winw - margin_left; pad = newpad (padl, padw); - popup_win = popup (winl, winw, 1, 2, pop_title, (char *)0, 1); + popup_win = popup (winl, winw, 1, 2, pop_title, NULL, 1); if (strncmp (pop_title, _("Appointment"), 11) == 0) { mvwprintw (popup_win, margin_top, margin_left, "- %s -> %s", @@ -557,7 +557,7 @@ new_tempfile (const char *prefix, int trailing_len) close (fd); } ERROR_MSG (_("temporary file \"%s\" could not be created"), fullname); - return (char *)0; + return NULL; } fclose (file); -- cgit v1.2.3