diff --git a/libc/string/lib_memccpy.c b/libc/string/lib_memccpy.c index bbb307afc65..2201870911e 100644 --- a/libc/string/lib_memccpy.c +++ b/libc/string/lib_memccpy.c @@ -81,16 +81,12 @@ FAR void *memccpy(FAR void *s1, FAR const void *s2, int c, size_t n) /* Did we just copy the terminating byte c? */ - if (*pout == (unsigned char)c) + if (*pout++ == (unsigned char)c) { /* Yes return a pointer to the byte after the copy of c into s1 */ return (FAR void *)pout; } - - /* No increment to the next destination location */ - - pout++; } /* C was not found in the first n bytes of s2 */ diff --git a/libc/string/lib_strcasecmp.c b/libc/string/lib_strcasecmp.c index 9017625b2a1..5fa3e289149 100644 --- a/libc/string/lib_strcasecmp.c +++ b/libc/string/lib_strcasecmp.c @@ -46,7 +46,7 @@ * Public Functions ****************************************************************************/ -#ifndef CONFIG_ARCH_STRCMP +#ifndef CONFIG_ARCH_STRCASECMP int strcasecmp(FAR const char *cs, FAR const char *ct) { int result;