[PATCH v5 next 04/17] tools/nolibc: Rename the 'errnum' parameter to strerror()

From: david . laight . linux

Date: Sun Mar 08 2026 - 07:38:35 EST


From: David Laight <david.laight.linux@xxxxxxxxx>

Change the parameter variable name from 'errno' to 'errnum'.
Matches any documentation and avoids any issues that might happen
if errno is actually a #define (which is not uncommon).

Acked-by: Willy Tarreau <w@xxxxxx>
Signed-off-by: David Laight <david.laight.linux@xxxxxxxxx>
---

Unchanged for v5.

v4:
- split from the previous patch.

tools/include/nolibc/stdio.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h
index af2d5be47aa3..17ca206f77fe 100644
--- a/tools/include/nolibc/stdio.h
+++ b/tools/include/nolibc/stdio.h
@@ -734,7 +734,7 @@ int strerror_r(int errnum, char *buf, size_t buflen)
}

static __attribute__((unused))
-const char *strerror(int errno)
+const char *strerror(int errnum)
{
static char buf[18];
char *b = buf;
@@ -743,7 +743,7 @@ const char *strerror(int errno)
_NOLIBC_OPTIMIZER_HIDE_VAR(b);

/* Use strerror_r() to avoid having the only .data in small programs. */
- strerror_r(errno, b, sizeof(buf));
+ strerror_r(errnum, b, sizeof(buf));

return b;
}
--
2.39.5