-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_memalloc.c
More file actions
executable file
·25 lines (22 loc) · 1.06 KB
/
Copy pathft_memalloc.c
File metadata and controls
executable file
·25 lines (22 loc) · 1.06 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: frcugy <frcugy@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/11/03 11:17:06 by frcugy #+# #+# */
/* Updated: 2014/11/04 15:17:59 by frcugy ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memalloc(size_t size)
{
void *ap;
if (size == 0)
return (NULL);
if (!(ap = (void*)(malloc(size))))
return (NULL);
ft_bzero(ap, size);
return (ap);
}