From 8f60709261d2bdd37ab64256128790c2874e20bf Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Sun, 2 Feb 2020 16:45:32 +0100 Subject: Less lines --- src/ft_init_lists.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/ft_init_lists.c') diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index 217d303..54a7902 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -31,15 +31,13 @@ t_cub !(clist->so_tex_path = (char*)ft_calloc(1, sizeof(char))) || !(clist->ea_tex_path = (char*)ft_calloc(1, sizeof(char))) || !(clist->we_tex_path = (char*)ft_calloc(1, sizeof(char))) || - !(clist->sprite_path = (char*)ft_calloc(1, sizeof(char)))) + !(clist->sprite_path = (char*)ft_calloc(1, sizeof(char))) || + !(clist->map = (char**)ft_calloc(2, sizeof(char*))) || + !(clist->map[0] = (char*)ft_calloc(1, sizeof(char)))) return (NULL); + clist->map[1] = 0; clist->f_color = -1; clist->c_color = -1; - if (!(clist->map = (char**)ft_calloc(2, sizeof(char*)))) - return (NULL); - if (!(clist->map[0] = (char*)ft_calloc(1, sizeof(char)))) - return (NULL); - clist->map[1] = 0; clist->map_w = 0; clist->line_chk = 0; return (clist); -- cgit v1.2.3