Guest User

Untitled

a guest
Dec 14th, 2019
110
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void clear(list *L)
  2. {
  3. node **x;
  4. if(L->head)
  5. {
  6. *x = L->head;
  7. while((*x)->next)
  8. {
  9. *x = (*x)->next;
  10. free((*x)->prev);
  11. (*x)->prev = NULL;
  12. }
  13. free(*x);
  14. *x = NULL;
  15. }
  16. }
RAW Paste Data