mirror of
https://github.com/reactos/reactos.git
synced 2024-11-11 01:04:11 +00:00
c424146e2c
svn path=/branches/cmake-bringup/; revision=48236
18 lines
215 B
C
18 lines
215 B
C
/*
|
|
* $Id$
|
|
*/
|
|
|
|
#include <string.h>
|
|
|
|
void* memchr(const void *s, int c, size_t n)
|
|
{
|
|
if (n)
|
|
{
|
|
const char *p = s;
|
|
do {
|
|
if (*p++ == c)
|
|
return (void *)(p-1);
|
|
} while (--n != 0);
|
|
}
|
|
return 0;
|
|
}
|