diff options
author | ngie <ngie@FreeBSD.org> | 2017-07-18 08:50:36 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-07-18 08:50:36 +0000 |
commit | c2386d16757759d25bdba3ec62100010d7617be9 (patch) | |
tree | 49fb6df239c90ac6588af396fb2749b43b0c54b7 | |
parent | 8c406eee40ce1e7d68cd1452c347c44d311160d9 (diff) | |
download | FreeBSD-src-c2386d16757759d25bdba3ec62100010d7617be9.zip FreeBSD-src-c2386d16757759d25bdba3ec62100010d7617be9.tar.gz |
MFC r318695:
err(3): use `NULL`, aka `(void*)0` per POSIX instead of `(FILE *)0`
This is being done to aid humans and static analysis checkers.
-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 6db66d3..8efc480 100644 --- a/lib/libc/gen/err.c +++ b/lib/libc/gen/err.c @@ -100,7 +100,7 @@ void verrc(int eval, int code, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) { vfprintf(err_file, fmt, ap); @@ -125,7 +125,7 @@ void verrx(int eval, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) vfprintf(err_file, fmt, ap); @@ -165,7 +165,7 @@ void vwarnc(int code, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) { vfprintf(err_file, fmt, ap); @@ -187,7 +187,7 @@ void vwarnx(const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) vfprintf(err_file, fmt, ap); |