diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-22 23:27:56 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-22 23:30:32 +0100 |
| commit | 0f30d227497418c6d3bef7d52244407e30454504 (patch) | |
| tree | 0e1ac19623d3268380cf74328cdf643648a2f43c /lib/libc/sys/getauxval.c | |
| parent | 90dad97fc07f049383903a166631e2c257f9b8c1 (diff) | |
Added c11 threads, fixed some locks and add *_unlocked functions
Diffstat (limited to 'lib/libc/sys/getauxval.c')
| -rw-r--r-- | lib/libc/sys/getauxval.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/sys/getauxval.c b/lib/libc/sys/getauxval.c index c9a2bf66..f58aae33 100644 --- a/lib/libc/sys/getauxval.c +++ b/lib/libc/sys/getauxval.c @@ -5,12 +5,12 @@ unsigned long getauxval(unsigned long type) { - size_t *auxv = __libc.auxv; + size_t *p = __libc.auxv; - while (*auxv) { - if (*auxv == type) - return auxv[1]; - auxv += 2; + while (*p != 0) { + if (*p == type) + return p[1]; + p += 2; } errno = ENOENT; |
