libc/arch_libc.c:fix bug for macro LIBC_ARCH_STRCHRNUL

config ARM64_STRCHRNUL
	bool "Enable optimized strchrnul() for ARM64"
	default n
	select LIBC_ARCH_STRCHRNUL
	depends on ARCH_TOOLCHAIN_GNU
	---help---
		Enable optimized ARM64 specific strchrnul() library function

Signed-off-by: yangao1 <yangao1@xiaomi.com>
This commit is contained in:
yangao1
2025-05-21 11:01:25 +08:00
committed by Xiang Xiao
parent 184f1ef225
commit 011fd50bcd
+3 -3
View File
@@ -73,7 +73,7 @@ FAR char *ARCH_LIBCFUN(strncpy)(FAR char *dest,
FAR char *ARCH_LIBCFUN(strchr)(FAR const char *s, int c);
#endif
#ifdef CONFIG_LIBC_ARCH_STRCHNUL
#ifdef CONFIG_LIBC_ARCH_STRCHRNUL
FAR char *ARCH_LIBCFUN(strchrnul)(FAR const char *s, int c);
#endif
@@ -240,8 +240,8 @@ FAR char *strchr(FAR const char *s, int c)
}
#endif
#ifdef CONFIG_LIBC_ARCH_STRCHNUL
FAR char *strchrnul(FAR const char *s, int c);
#ifdef CONFIG_LIBC_ARCH_STRCHRNUL
FAR char *strchrnul(FAR const char *s, int c)
{
# ifdef CONFIG_MM_KASAN_INSTRUMENT
# ifndef CONFIG_MM_KASAN_DISABLE_READS_CHECK