Commits

Anonymous committed 32ce057

change refernce in list _del

Comments (0)

Files changed (1)

     p = *l;                                       \
     p->next->prev = p->prev;                      \
     p->prev->next = p->next;                      \
-    if (p->next == p)                             \
-        *l = NULL;                                \
+    *l = (p->next == p) ? NULL : p->next;         \
     free(p);                                      \
 }                                                 \
 void Name##_del_all(Name **l)                     \