From de9c1e498c9083787fed20b89b77dce7f67d668e Mon Sep 17 00:00:00 2001 From: ngie Date: Sat, 3 Dec 2016 17:17:42 +0000 Subject: MFC r297790: r297790 (by pfg): libc: replace 0 with NULL for pointers. While here also cleanup some surrounding code; particularly drop some malloc() casts. Found with devel/coccinelle. --- lib/libc/gen/err.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/libc/gen/err.c') diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c index 0ba584c..6db66d3 100644 --- a/lib/libc/gen/err.c +++ b/lib/libc/gen/err.c @@ -99,7 +99,7 @@ errc(int eval, int code, const char *fmt, ...) void verrc(int eval, int code, const char *fmt, va_list ap) { - if (err_file == 0) + if (err_file == NULL) err_set_file((FILE *)0); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) { @@ -124,7 +124,7 @@ errx(int eval, const char *fmt, ...) void verrx(int eval, const char *fmt, va_list ap) { - if (err_file == 0) + if (err_file == NULL) err_set_file((FILE *)0); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) @@ -164,7 +164,7 @@ warnc(int code, const char *fmt, ...) void vwarnc(int code, const char *fmt, va_list ap) { - if (err_file == 0) + if (err_file == NULL) err_set_file((FILE *)0); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) { @@ -186,7 +186,7 @@ warnx(const char *fmt, ...) void vwarnx(const char *fmt, va_list ap) { - if (err_file == 0) + if (err_file == NULL) err_set_file((FILE *)0); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) -- cgit v1.1