-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_calloc.c
22 lines (19 loc) · 1.04 KB
/
ft_calloc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_calloc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: earnaud <earnaud@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/06 12:56:07 by earnaud #+# #+# */
/* Updated: 2020/11/09 15:40:36 by earnaud ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_calloc(size_t nmemb, size_t size)
{
void *result;
if ((result = malloc(nmemb * size)))
ft_bzero(result, nmemb * size);
return (result);
}