-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_memset.c
More file actions
23 lines (20 loc) · 1.12 KB
/
ft_memset.c
File metadata and controls
23 lines (20 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memset.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mschumac <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/05/05 20:28:55 by mschumac #+# #+# */
/* Updated: 2017/05/06 04:43:45 by mschumac ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memset(void *destination, int c, size_t byte_counter)
{
unsigned char *initial_destination;
initial_destination = destination;
while (byte_counter--)
*initial_destination++ = (unsigned char)c;
return (destination);
}