-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_memalloc.c
More file actions
27 lines (24 loc) · 1.11 KB
/
Copy pathft_memalloc.c
File metadata and controls
27 lines (24 loc) · 1.11 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
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memalloc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nmncube <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/06/07 09:39:34 by nmncube #+# #+# */
/* Updated: 2019/06/17 14:40:14 by nmncube ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memalloc(size_t size)
{
int *input;
input = (int*)malloc(size * sizeof(int));
if (input == NULL)
return (NULL);
ft_memset(input, 0, size);
if (input != NULL)
return ((void*)input);
else
return (NULL);
}