23 lines
1 KiB
C
23 lines
1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_memset.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2017/10/22 14:37:31 by jhalford #+# #+# */
|
|
/* Updated: 2017/10/22 15:00:47 by jhalford ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "malloc_internal.h"
|
|
|
|
void *ft_memset(void *b, int c, size_t len)
|
|
{
|
|
size_t i;
|
|
|
|
i = -1;
|
|
while (++i < len)
|
|
((unsigned char *)b)[i] = (unsigned char)c;
|
|
return (b);
|
|
}
|