bionic: Fix strnlen to work with length of -1

This is used to mean INT_MAX.
This commit is contained in:
Sean Cross 2014-09-09 13:59:18 +08:00
parent a066600558
commit f82c53bfdc
2 changed files with 5 additions and 2 deletions

View file

@ -697,7 +697,7 @@ int _strlen(const char *s)
return i;
}
int _strnlen(const char *s, int maxlen)
int _strnlen(const char *s, uint32_t maxlen)
{
int i = 0;
while(s[i++] && i < maxlen);