git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git]
/
lib
/
crtdll
/
string
/
memchr.c
1
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
3
4
#include <crtdll/string.h>
5
6
void *
7
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
}