summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-08-03 09:28:48 +0200
committerWilly Tarreau <w@1wt.eu>2023-08-23 05:17:07 +0200
commit04694658ad4a7df13a74160864d87ab858a9da53 (patch)
treebb81b4fe24d7c3da92c3af0c09ba4bc57cb6c2c7
parent809145f8421b2212dd61c6f7385f79b78b7485d5 (diff)
tools/nolibc: sys: avoid implicit sign cast
getauxval() returns an unsigned long but the overall type of the ternary operator needs to be signed. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r--tools/include/nolibc/sys.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index c151533ba8e9..833d6c5e86dc 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -466,7 +466,7 @@ static unsigned long getauxval(unsigned long key);
static __attribute__((unused))
int getpagesize(void)
{
- return __sysret(getauxval(AT_PAGESZ) ?: -ENOENT);
+ return __sysret((int)getauxval(AT_PAGESZ) ?: -ENOENT);
}