clean up code for when an error occurs

testing with all maps is what is left
This commit is contained in:
Mthandazo Ndhlovu
2019-04-11 14:11:25 +02:00
parent eb85b914a4
commit 0495ba9e55
3 changed files with 8 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ static int lem_in(t_syntax *synt, t_holder *holder,
{
if (!(lm_parser(synt, lmdata, holder)))
return (0);
if (!(lm_verify_cmd(synt, holder, data)))
if (!(lm_verify_cmd(synt, holder, lmdata)))
return (0);
if (!lst_indinit(lmdata))
return (0);

View File

@@ -31,7 +31,7 @@ void lm_clear_unv(t_holder *holder)
t_temp *flush;
data = holder->data;
while (tmp)
while (data)
{
flush = data;
data = data->next;
@@ -48,5 +48,6 @@ int lm_verify_cmd(t_syntax *synt, t_holder *holder, t_lmdata *data)
&& synt->nb_state && (holder->count > 0)
&& (data->nb_nodes > 0))
return (1);
lm_clear_unv(holder);
return (0);
}
}