-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_memalloc.c
22 lines (19 loc) · 1.02 KB
/
ft_memalloc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memalloc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sael-you <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/08 15:38:46 by sael-you #+# #+# */
/* Updated: 2019/04/22 15:57:20 by sael-you ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memalloc(size_t size)
{
void *tab;
if (!(tab = malloc(size)))
return (NULL);
return (ft_memset(tab, 0, size));
}