From 5ce2ad3ec2b1725c4e5138cebfdf2a716014ba74 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 27 Jan 2015 09:09:00 +1100 Subject: [PATCH] Revert "Add a DL_DELETE_INIT to delete items from a DL list and NULL the prev/next pointers" This reverts commit 49266178e5a28ba09ab3d3958f54bde425e82341. --- src/utlist.h | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/utlist.h b/src/utlist.h index b4558aee..48a8c7d0 100644 --- a/src/utlist.h +++ b/src/utlist.h @@ -572,28 +572,6 @@ do { } \ } while (0) -#define DL_DELETE_INIT(head,del) \ - DL_DELETE3(head,del,prev,next) - -#define DL_DELETE3(head,del,prev,next) \ -do { \ - assert((del)->prev != NULL); \ - if ((del)->prev == (del)) { \ - (head)=NULL; \ - } else if ((del)==(head)) { \ - (del)->next->prev = (del)->prev; \ - (head) = (del)->next; \ - } else { \ - (del)->prev->next = (del)->next; \ - if ((del)->next) { \ - (del)->next->prev = (del)->prev; \ - } else { \ - (head)->prev = (del)->prev; \ - } \ - } \ - (del)->prev = (del)->next = NULL; \ -} while (0) - #define DL_COUNT(head,el,counter) \ DL_COUNT2(head,el,counter,next) \