12 lines
135 B
C
12 lines
135 B
C
|
#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;
|
||
|
}
|