fractol/libft/src/ft_memset.c

28 lines
1.0 KiB
C
Raw Normal View History

2023-03-01 04:36:42 +01:00
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_memset.c :+: :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/01 08:42:45 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:39 by houtworm ### ########.fr */
/* */
/* ************************************************************************** */
#include "../libft.h"
void *ft_memset(void *s, int c, size_t n)
{
char *p;
p = s;
while (n > 0)
{
*p = c;
p++;
n--;
}
return (s);
}