/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_memset.c                                        :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: pbonilla <eirodeis.lepnj@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/10/27 17:57:35 by pbonilla          #+#    #+#             */
/*   Updated: 2020/11/11 15:46:56 by pbonilla         ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "libft.h"

void	*ft_memset(void *s, int c, size_t n)
{
	unsigned char	*buff;
	unsigned int	i;

	buff = s;
	i = -1;
	while (++i != n)
		*(buff + i) = c;
	s = (void *)buff;
	return (s);
}