1
0
mirror of https://github.com/UzixLS/KernelEx.git synced 2025-07-18 23:11:19 +03:00
Files
KernelEx/kexcrt/memchr.c
2018-11-03 16:21:13 +03:00

20 lines
235 B
C
Executable File

/*
* memchr.c
*/
#include <stddef.h>
#include <string.h>
void *memchr(const void *s, int c, size_t n)
{
const unsigned char *sp = s;
while (n--) {
if (*sp == (unsigned char)c)
return (void *)sp;
sp++;
}
return NULL;
}