diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-10 19:33:58 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-10 19:33:58 +0000 |
commit | 6e91d78151e10ed31c475cafe6a1e1f11950c1d9 (patch) | |
tree | 6796a0cd32cea8fd5591b7f2c6d10ae7f153ccb9 /lib/libc/gen/err.c | |
parent | 1485828b0840fbefcb7789ae54df9650c16fda61 (diff) | |
download | FreeBSD-src-6e91d78151e10ed31c475cafe6a1e1f11950c1d9.zip FreeBSD-src-6e91d78151e10ed31c475cafe6a1e1f11950c1d9.tar.gz |
libc: replace 0 with NULL for pointers.
While here also cleanup some surrounding code; particularly
drop some malloc() casts.
Found with devel/coccinelle.
Reviewed by: bde (previous version - all new bugs are mine)
Diffstat (limited to 'lib/libc/gen/err.c')
-rw-r--r-- | lib/libc/gen/err.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c index a536e5a..3b32c3d 100644 --- a/lib/libc/gen/err.c +++ b/lib/libc/gen/err.c @@ -96,7 +96,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) { @@ -121,7 +121,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) @@ -161,7 +161,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) { @@ -183,7 +183,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) |