LeonorMalaga / gt_datalib

Práctica 2 del Taller de Git y GitHub de 42 Málaga
https://view.genial.ly/63a443410483340018b52bed/presentation-42-taller-de-git-y-github
0 stars 1 forks source link

dll_remove_last #28

Open LeonorMalaga opened 3 months ago

LeonorMalaga commented 3 months ago

void dll_remove_last(t_dlist *list) { t_dlist aux;

if (dll_empty(*list))
    return ;
aux = *list;
while (aux->next)
    aux = aux->next;
if (aux->prev)
    aux->prev->next = NULL;
else
    *list = NULL;
free(aux);

}