Fix the *return* types in the arm64 dynamic function dispatch.
No actual effect on the code, but misleading and wrong. (The previous
change only fixed the argument types; I didn't notice that some of the
return types were wrong too.)
Test: treehugger
Change-Id: I1ee5c48e2652fd8cbf8178d5659e57f79e61898e
diff --git a/libc/arch-arm64/dynamic_function_dispatch.cpp b/libc/arch-arm64/dynamic_function_dispatch.cpp
index b32b2cd..b9f657b 100644
--- a/libc/arch-arm64/dynamic_function_dispatch.cpp
+++ b/libc/arch-arm64/dynamic_function_dispatch.cpp
@@ -41,7 +41,7 @@
}
}
-typedef void* memcmp_func(const void*, const void*, size_t);
+typedef int memcmp_func(const void*, const void*, size_t);
DEFINE_IFUNC_FOR(memcmp) {
// TODO: enable the SVE version.
RETURN_FUNC(memcmp_func, __memcmp_aarch64);
@@ -65,7 +65,7 @@
}
}
-typedef int stpcpy_func(char*, const char*, size_t);
+typedef char* stpcpy_func(char*, const char*, size_t);
DEFINE_IFUNC_FOR(stpcpy) {
// TODO: enable the SVE version.
RETURN_FUNC(stpcpy_func, __stpcpy_aarch64);
@@ -95,7 +95,7 @@
RETURN_FUNC(strcmp_func, __strcmp_aarch64);
}
-typedef int strcpy_func(char*, const char*);
+typedef char* strcpy_func(char*, const char*);
DEFINE_IFUNC_FOR(strcpy) {
// TODO: enable the SVE version.
RETURN_FUNC(strcpy_func, __strcpy_aarch64);