projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add fast path for normal mutexes back to pthread_mutex_lock
[oweals/musl.git]
/
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
}