mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 06:41:39 -04:00
tools/nolibc: Rename the 'errnum' parameter to strerror()
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@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260308113742.12649-5-david.laight.linux@gmail.com Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
This commit is contained in:
committed by
Thomas Weißschuh
parent
2177dd375d
commit
c0a08eb87f
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user