[PATCH v4 next 10/23] tools/nolibc: Rename the 'errnum' parameter to strerror()
From: david . laight . linux
Date: Mon Mar 02 2026 - 05:24:03 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).
Signed-off-by: David Laight <david.laight.linux@xxxxxxxxx>
---
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 03fcd0229f90..a567b9a5c31e 100644
--- a/tools/include/nolibc/stdio.h
+++ b/tools/include/nolibc/stdio.h
@@ -730,7 +730,7 @@ int strerror_r(int errnum, char *buf, size_t buflen __attribute__((unused)))
}
static __attribute__((unused))
-const char *strerror(int errno)
+const char *strerror(int errnum)
{
static char buf[18];
char *b = buf;
@@ -739,7 +739,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