fix wrong return value from wmemmove on forward copies
[musl] / src / string / strnlen.c
1 #include <string.h>
2
3 size_t strnlen(const char *s, size_t n)
4 {
5         const char *p = memchr(s, 0, n);
6         return p ? p-s : n;
7 }