From b38d86a585cd16e84b1d8fe4cca88ed873051fd7 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 24 Oct 2020 00:03:11 +0000 Subject: [PATCH] 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. --- lib/libc/gen/err.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c index c536767f1a6b..e72fac99ee61 100644 --- a/lib/libc/gen/err.c +++ b/lib/libc/gen/err.c @@ -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)