From 5f59a34ab747dde8ede7357f3431bf06bd6002fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 8 Mar 2026 17:28:33 +0100 Subject: New upstream version 1.4.2 --- tests/strerror_r.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/strerror_r.c') diff --git a/tests/strerror_r.c b/tests/strerror_r.c index 1e6974e3..ec7bfe6b 100644 --- a/tests/strerror_r.c +++ b/tests/strerror_r.c @@ -1,6 +1,6 @@ /* strerror_r.c --- POSIX compatible system error routine - Copyright (C) 2010-2025 Free Software Foundation, Inc. + Copyright (C) 2010-2026 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -103,10 +103,8 @@ static int local_snprintf (char *buf, size_t buflen, const char *format, ...) { va_list args; - int result; - va_start (args, format); - result = _vsnprintf (buf, buflen, format, args); + int result = _vsnprintf (buf, buflen, format, args); va_end (args); if (buflen > 0 && (result < 0 || result >= buflen)) buf[buflen - 1] = '\0'; @@ -222,9 +220,8 @@ strerror_r (int errnum, char *buf, size_t buflen) if (!ret && strlen (buf) == buflen - 1) { char stackbuf[STACKBUF_LEN]; - size_t len; strerror_r (errnum, stackbuf, sizeof stackbuf); - len = strlen (stackbuf); + size_t len = strlen (stackbuf); /* STACKBUF_LEN should have been large enough. */ if (len + 1 == sizeof stackbuf) abort (); -- cgit v1.2.3