-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_memalloc.c
More file actions
25 lines (22 loc) · 1.08 KB
/
Copy pathft_memalloc.c
File metadata and controls
25 lines (22 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memalloc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gdannay <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/10 12:14:16 by gdannay #+# #+# */
/* Updated: 2017/11/13 14:12:20 by gdannay ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include <string.h>
#include "libft.h"
void *ft_memalloc(size_t size)
{
void *new;
if ((new = (void *)malloc(sizeof(new) * size)) == NULL)
return (NULL);
ft_bzero(new, size);
return (new);
}