From 20f9d67327ac4ae0f5dc7e4f8d22cf8a85602cda Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 22 May 2023 19:28:33 +0000 Subject: [PATCH] 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 --- libc/arch-arm64/dynamic_function_dispatch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libc/arch-arm64/dynamic_function_dispatch.cpp b/libc/arch-arm64/dynamic_function_dispatch.cpp index b32b2cd54..b9f657bb2 100644 --- a/libc/arch-arm64/dynamic_function_dispatch.cpp +++ b/libc/arch-arm64/dynamic_function_dispatch.cpp @@ -41,7 +41,7 @@ DEFINE_IFUNC_FOR(memchr) { } } -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 @@ DEFINE_IFUNC_FOR(memmove) { } } -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 @@ DEFINE_IFUNC_FOR(strcmp) { 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);