summaryrefslogtreecommitdiff
path: root/graphs/piscine/my_memset/my_memset.c
blob: 243a5acf51ce6a4e7409aa98225e3f9d56b4a110 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "my_memset.h"

void *my_memset(void *s, int c, size_t n)
{
    unsigned char *t = s;
    for (size_t i = 0; i < n; i++)
    {
        t[i] = c;
    }

    return t;
}