/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* memset.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: scebula +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/11/23 16:17:13 by scebula #+# #+# */ /* Updated: 2015/12/04 00:23:59 by scebula ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" void *ft_memset(void *b, int c, size_t n) { unsigned char *p; p = (unsigned char *)b; while (n > 0) { *p = (unsigned char)c; n--; p++; } return (b); }