Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jul 2017 08:50:36 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r321124 - stable/10/lib/libc/gen
Message-ID:  <201707180850.v6I8oaOs041370@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Tue Jul 18 08:50:36 2017
New Revision: 321124
URL: https://svnweb.freebsd.org/changeset/base/321124

Log:
  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.

Modified:
  stable/10/lib/libc/gen/err.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/gen/err.c
==============================================================================
--- stable/10/lib/libc/gen/err.c	Tue Jul 18 08:44:48 2017	(r321123)
+++ stable/10/lib/libc/gen/err.c	Tue Jul 18 08:50:36 2017	(r321124)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707180850.v6I8oaOs041370>