svn commit: r318695 - head/lib/libc/gen
Ngie Cooper
ngie at FreeBSD.org
Tue May 23 06:14:04 UTC 2017
Author: ngie
Date: Tue May 23 06:14:02 2017
New Revision: 318695
URL: https://svnweb.freebsd.org/changeset/base/318695
Log:
err(3): use `NULL`, aka `(void*)0` per POSIX instead of `(FILE *)0`
This is being done to aid humans and static analysis checkers.
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Modified:
head/lib/libc/gen/err.c
Modified: head/lib/libc/gen/err.c
==============================================================================
--- head/lib/libc/gen/err.c Tue May 23 06:05:54 2017 (r318694)
+++ head/lib/libc/gen/err.c Tue May 23 06:14:02 2017 (r318695)
@@ -97,7 +97,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);
@@ -122,7 +122,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);
@@ -162,7 +162,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);
@@ -184,7 +184,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);
More information about the svn-src-head
mailing list