aboutsummaryrefslogtreecommitdiff
path: root/include/ntp_lists.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ntp_lists.h')
-rw-r--r--include/ntp_lists.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ntp_lists.h b/include/ntp_lists.h
index d741974943ef..bed692ff294e 100644
--- a/include/ntp_lists.h
+++ b/include/ntp_lists.h
@@ -181,7 +181,7 @@ do { \
#define UNLINK_EXPR_SLIST(punlinked, listhead, expr, nextlink, \
entrytype) \
-do { \
+if (NULL != (listhead)) { \
entrytype **ppentry; \
\
ppentry = &(listhead); \
@@ -202,6 +202,8 @@ do { \
} else { \
(punlinked) = NULL; \
} \
+} else do { \
+ (punlinked) = NULL; \
} while (FALSE)
#define UNLINK_SLIST(punlinked, listhead, ptounlink, nextlink, \