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-2003050101
[reactos.git]
/
lib
/
ntdll
/
string
/
memchr.c
1
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
3
#include <string.h>
4
5
void *
6
memchr(const void *s, int c, size_t n)
7
{
8
if (n)
9
{
10
const char *p = s;
11
do {
12
if (*p++ == c)
13
return (void *)(p-1);
14
} while (--n != 0);
15
}
16
return 0;
17
}