git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
update for HEAD-2003091401
[reactos.git]
/
lib
/
string
/
memchr.c
1
/*
2
* $Id$
3
*/
4
5
#include <string.h>
6
7
void* memchr(const void *s, int c, size_t n)
8
{
9
if (n)
10
{
11
const char *p = s;
12
do {
13
if (*p++ == c)
14
return (void *)(p-1);
15
} while (--n != 0);
16
}
17
return 0;
18
}