This repository has been archived on 2024-06-25. You can view files and clone it, but cannot push or open issues or pull requests.
rockOS/libc/string/memset.c
2022-07-18 09:59:04 +03:00

10 lines
231 B
C

#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;
}