-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_calloc.c
More file actions
24 lines (21 loc) · 1.07 KB
/
ft_calloc.c
File metadata and controls
24 lines (21 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_calloc.c :+: :+: */
/* +:+ */
/* By: ivork <ivork@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/08 21:00:49 by ivork #+# #+# */
/* Updated: 2021/10/12 17:53:18 by ivork ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_calloc(size_t nitems, size_t size)
{
char *mem;
mem = (char *)malloc(nitems * size);
if (mem == NULL)
return (NULL);
ft_bzero(mem, (nitems * size));
return (mem);
}