projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
809145f
)
tools/nolibc: sys: avoid implicit sign cast
author
Thomas Weißschuh
<linux@weissschuh.net>
Thu, 3 Aug 2023 07:28:48 +0000
(09:28 +0200)
committer
Willy Tarreau
<w@1wt.eu>
Wed, 23 Aug 2023 03:17:07 +0000
(
05:17
+0200)
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>
tools/include/nolibc/sys.h
patch
|
blob
|
history
diff --git
a/tools/include/nolibc/sys.h
b/tools/include/nolibc/sys.h
index
c151533
..
833d6c5
100644
(file)
--- 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);
}