Fix some issues with strcasecmp() conditional compilation and with memccpy() return value

This commit is contained in:
=?UTF-8?B?6ZmI5p6X6aOe?= 2016-01-24 12:54:32 -06:00 committed by Gregory Nutt
parent 2bacc40350
commit 0e3cd129ae
2 changed files with 2 additions and 6 deletions

View File

@ -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 */

View File

@ -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;