summaryrefslogtreecommitdiff
path: root/riscv/riscv-probe/libfemto/std/memset.c
blob: 82b15456bf896c7dd7141a438761ddcc0b3c8873 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// See LICENSE for license details.

#include <stddef.h>

void *memset(void *dest, int c, size_t n)
{
    char *p = dest;
    while (n-- > 0) {
        *(char*)dest++ = c;
    }
    return p;
}