summaryrefslogtreecommitdiff
path: root/kernel/libc/string/memset.c
blob: 34fd5074dbd3792d5442aea655b9c41bc4f5f1f6 (plain)
1
2
3
4
5
6
7
8
9
10
#include <string.h>

void *memset(void *dst, const unsigned char c, u32 n) {
  uintptr_t d = (uintptr_t)dst;
  for (u32 i = 0; i < n; i++, d++) {
    *(unsigned char *)d = c;
  }

  return (void *)d;
}