k-chow/libs/libc/memset.c

12 lines
135 B
C
Raw Permalink Normal View History

#include <string.h>
void *memset(void *s, int c, size_t n)
{
char *p = s;
for (size_t i = 0; i < n; ++i)
p[i] = c;
return s;
}