24 lines
1.0 KiB
C
24 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_calloc.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: pbonilla <eirodeis.lepnj@gmail.com> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2020/11/11 18:51:50 by pbonilla #+# #+# */
|
|
/* Updated: 2020/11/11 19:19:16 by pbonilla ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
void *ft_calloc(size_t nmemb, size_t size)
|
|
{
|
|
char *s;
|
|
|
|
if (!(s = malloc(size * nmemb)))
|
|
return (NULL);
|
|
ft_memset(s, 0, size * nmemb);
|
|
return (s);
|
|
}
|