Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | ** EPITECH PROJECT, 2024 | ||
3 | ** my_memset | ||
4 | ** File description: | ||
5 | ** The my_memset.c | ||
6 | */ | ||
7 | |||
8 | #include "mymemory.h" | ||
9 | |||
10 | 9 | void *my_memset(void *pointer, int value, size_t size) | |
11 | { | ||
12 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 8 times.
|
9 | if (pointer == NULL) |
13 | 1 | return NULL; | |
14 |
2/2✓ Branch 0 taken 80 times.
✓ Branch 1 taken 8 times.
|
88 | for (size_t i = 0; i < size; i++) |
15 | 80 | ((char *)pointer)[i] = value; | |
16 | 8 | return pointer; | |
17 | } | ||
18 |