diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-16 19:28:18 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-16 19:28:18 +0100 |
commit | 7f3461875572335eedffa272226199dd1c2fc92a (patch) | |
tree | ab0a7ac913340dc09222cd49c72ead44ddc93fd4 /src/ft_get_map.c | |
parent | Still searching (diff) | |
download | 42-cub3d-7f3461875572335eedffa272226199dd1c2fc92a.tar.gz 42-cub3d-7f3461875572335eedffa272226199dd1c2fc92a.tar.bz2 42-cub3d-7f3461875572335eedffa272226199dd1c2fc92a.tar.xz 42-cub3d-7f3461875572335eedffa272226199dd1c2fc92a.tar.zst 42-cub3d-7f3461875572335eedffa272226199dd1c2fc92a.zip |
Cleaner memdels
Diffstat (limited to '')
-rw-r--r-- | src/ft_get_map.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ft_get_map.c b/src/ft_get_map.c index 08c9734..8602ce3 100644 --- a/src/ft_get_map.c +++ b/src/ft_get_map.c @@ -58,22 +58,22 @@ int clist->mlist.map_start = clist->mlist.line_chk; if (!line[0]) { - ft_memdel((void**)&line); + ft_memdel((void*)&line); ft_sprintf(clist->errmsg, FT_ERR_READ); return (-1); } if (ft_check_map_line(line, 1, clist) < 0) { - ft_memdel((void**)&line); + ft_memdel((void*)&line); return (-1); } - ft_memdel((void**)&clist->mlist.mapl); + ft_memdel((void*)&clist->mlist.mapl); if (ft_cat_mapl(line, clist) < 0) { - ft_memdel((void**)&line); + ft_memdel((void*)&line); return (-1); } - ft_memdel((void**)&line); + ft_memdel((void*)&line); return (1); } @@ -92,17 +92,17 @@ int { if (!line[0]) ft_sprintf(clist->errmsg, FT_ERR_MAP_EMPL); - ft_memdel((void**)&line); + ft_memdel((void*)&line); return (-1); } - ft_memdel((void**)&line); + ft_memdel((void*)&line); } - ft_memdel((void**)&line); + ft_memdel((void*)&line); clist->mlist.mapl[clist->mlist.mapl_len - 1] = '\0'; ft_free_words(clist->mlist.map); clist->mlist.map = ft_split(clist->mlist.mapl, '\n'); clist->mlist.map_h = ft_get_map_h(clist->mlist.map); clist->mlist.map_w = ft_get_map_w(clist->mlist.map); - ft_memdel((void**)&clist->mlist.mapl); + ft_memdel((void*)&clist->mlist.mapl); return (0); } |