/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_memset.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/11/24 14:45:37 by bchanot #+# #+# */ /* Updated: 2018/10/12 22:31:51 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" void *ft_memset(void *dst, int c, size_t len) { unsigned char *tmp; tmp = (unsigned char *)dst; while (len > 0) { len--; tmp[len] = (unsigned char)c; } dst = (void *)tmp; return (dst); }