summaryrefslogtreecommitdiffstats
path: root/libc/bionic/getauxval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/bionic/getauxval.cpp')
-rw-r--r--libc/bionic/getauxval.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/libc/bionic/getauxval.cpp b/libc/bionic/getauxval.cpp
index 38a05fc..fd225e0 100644
--- a/libc/bionic/getauxval.cpp
+++ b/libc/bionic/getauxval.cpp
@@ -32,17 +32,13 @@
#include <private/bionic_auxv.h>
#include <elf.h>
-__LIBC_HIDDEN__
-Elf32_auxv_t* __libc_auxv = NULL;
+__LIBC_HIDDEN__ Elf32_auxv_t* __libc_auxv = NULL;
extern "C" unsigned long int getauxval(unsigned long int type) {
- Elf32_auxv_t* v;
-
- for (v = __libc_auxv; v->a_type != AT_NULL; v++) {
+ for (Elf32_auxv_t* v = __libc_auxv; v->a_type != AT_NULL; ++v) {
if (v->a_type == type) {
return v->a_un.a_val;
}
}
-
return 0;
}