Syncboot/libc/string/memset.c

8 lines
205 B
C
Raw Normal View History

2019-04-03 21:46:58 +00:00
#include <string.h>
void* memset(void* bufptr, int value, size_t size) {
unsigned char* buf = (unsigned char*)bufptr;
for (size_t i = 0; i < size; i++)
buf[i] = (unsigned char)value;
return bufptr;
2019-04-01 01:18:48 +00:00
}