svn commit: r366983 - head/lib/libc/gen

Warner Losh imp at FreeBSD.org
Sat Oct 24 00:03:11 UTC 2020


Author: imp
Date: Sat Oct 24 00:03:11 2020
New Revision: 366983
URL: https://svnweb.freebsd.org/changeset/base/366983

Log:
  warnx: fix needless static
  
  I noticed after the review that these shouldn't be static. Remove the
  'static' from them, otherwise concurrent calls to warn* might see a
  similar but to the original.

Modified:
  head/lib/libc/gen/err.c

Modified: head/lib/libc/gen/err.c
==============================================================================
--- head/lib/libc/gen/err.c	Fri Oct 23 23:56:00 2020	(r366982)
+++ head/lib/libc/gen/err.c	Sat Oct 24 00:03:11 2020	(r366983)
@@ -161,7 +161,7 @@ warnc(int code, const char *fmt, ...)
 void
 vwarnc(int code, const char *fmt, va_list ap)
 {
-	static int saved_errno;
+	int saved_errno;
 
 	saved_errno = errno;
 	if (err_file == NULL)
@@ -187,7 +187,7 @@ warnx(const char *fmt, ...)
 void
 vwarnx(const char *fmt, va_list ap)
 {
-	static int saved_errno;
+	int saved_errno;
 
 	saved_errno = errno;
 	if (err_file == NULL)


More information about the svn-src-head mailing list