diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_init_map.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ft_init_map.c b/src/ft_init_map.c index c611ba2..a6704b6 100644 --- a/src/ft_init_map.c +++ b/src/ft_init_map.c @@ -34,15 +34,11 @@ static int8_t return (0); } -t_map - *ft_init_map(void) +int8_t + ft_init_map(t_map *mlist) { - t_map *mlist; - - if (!(mlist = (t_map*)malloc(sizeof(t_map)))) - return (NULL); if (ft_init_map_callocs(mlist) < 0) - return (NULL); + return (-1); mlist->map[1] = 0; mlist->map_w = 0; mlist->map_h = 0; @@ -56,5 +52,5 @@ t_map mlist->scale = 0; mlist->nlx = 0; mlist->nly = 0; - return (mlist); + return (0); } |