24 lines
1 KiB
C
24 lines
1 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_memset.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2016/11/28 12:06:20 by gtertysh #+# #+# */
|
||
|
/* Updated: 2016/11/28 16:47:35 by gtertysh ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
void *ft_memset(void *b, int c, size_t len)
|
||
|
{
|
||
|
unsigned char *s;
|
||
|
|
||
|
s = (unsigned char *)b;
|
||
|
while (len--)
|
||
|
*s++ = (unsigned char)c;
|
||
|
return (b);
|
||
|
}
|