-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpr_malloc.c
28 lines (24 loc) · 1.04 KB
/
pr_malloc.c
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
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pr_malloc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: obenazzo <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/06 10:54:33 by obenazzo #+# #+# */
/* Updated: 2018/03/01 00:56:45 by obenazzo ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractol.h"
void *pr_malloc(size_t n)
{
void *t;
if (!(t = malloc(n)))
print_error(ERR_MALLOC);
return (t);
}
void pr_free(void *p)
{
if (p)
free(p);
}