From 16c8f09a1f48af0ad2ddd6e5ea59abd50a792a0e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 28 Aug 2006 01:44:40 +0000 Subject: r17861: Fix inconsistency found in checking for NULL in DLIST_REMOVE macro. Don't check for NULL if we would have already derefed. Jeremy. (This used to be commit 1cb379315a45a0c47feab0df1f07ec5d808a4259) --- source3/include/dlinklist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/dlinklist.h b/source3/include/dlinklist.h index c856aaa762..daec7640e4 100644 --- a/source3/include/dlinklist.h +++ b/source3/include/dlinklist.h @@ -46,7 +46,7 @@ if ((p)->prev) (p)->prev->next = (p)->next; \ if ((p)->next) (p)->next->prev = (p)->prev; \ } \ - if ((p) && ((p) != (list))) (p)->next = (p)->prev = NULL; \ + if ((p) != (list)) (p)->next = (p)->prev = NULL; \ } /* promote an element to the top of the list */ -- cgit