29 lines
1.1 KiB
C
29 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_memset.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: gbrochar <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2015/11/23 17:53:16 by gbrochar #+# #+# */
|
|
/* Updated: 2015/11/25 12:18:32 by gbrochar ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
void *ft_memset(void *b, int c, size_t len)
|
|
{
|
|
unsigned char *byte;
|
|
size_t i;
|
|
|
|
byte = b;
|
|
i = 0;
|
|
while (i++ < len)
|
|
{
|
|
*byte = c;
|
|
byte++;
|
|
}
|
|
return (b);
|
|
}
|