summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/dlinklist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/include/dlinklist.h b/source3/include/dlinklist.h
index c35155d9bc..e68f2a4d86 100644
--- a/source3/include/dlinklist.h
+++ b/source3/include/dlinklist.h
@@ -47,7 +47,7 @@
if ((p)->prev) (p)->prev->next = (p)->next; \
if ((p)->next) (p)->next->prev = (p)->prev; \
} \
- (p)->next = (p)->prev = NULL; \
+ if ((p)) (p)->next = (p)->prev = NULL; \
}
/* promote an element to the top of the list */