Changes for #inclusivefixit.
Test: treehugger
Change-Id: I7ff0496c5c2792a41781e74634247f55b0548213
diff --git a/libc/bionic/getauxval.cpp b/libc/bionic/getauxval.cpp
index d6f75f8..a3c6b19 100644
--- a/libc/bionic/getauxval.cpp
+++ b/libc/bionic/getauxval.cpp
@@ -37,20 +37,20 @@
// This function needs to be safe to call before TLS is set up, so it can't
// access errno or the stack protector.
-__LIBC_HIDDEN__ unsigned long __bionic_getauxval(unsigned long type, bool& exists) {
+__LIBC_HIDDEN__ unsigned long __bionic_getauxval(unsigned long type, bool* exists) {
for (ElfW(auxv_t)* v = __libc_shared_globals()->auxv; v->a_type != AT_NULL; ++v) {
if (v->a_type == type) {
- exists = true;
+ *exists = true;
return v->a_un.a_val;
}
}
- exists = false;
+ *exists = false;
return 0;
}
extern "C" unsigned long getauxval(unsigned long type) {
bool exists;
- unsigned long result = __bionic_getauxval(type, exists);
+ unsigned long result = __bionic_getauxval(type, &exists);
if (!exists) errno = ENOENT;
return result;
}