diff options
-rw-r--r-- | lib/linklist.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/linklist.h b/lib/linklist.h index 4a65fead8..8a43fbe64 100644 --- a/lib/linklist.h +++ b/lib/linklist.h @@ -56,7 +56,8 @@ struct list { #define listtail(X) ((X) ? ((X)->tail) : NULL) #define listcount(X) ((X)->count) #define list_isempty(X) ((X)->head == NULL && (X)->tail == NULL) -#define listgetdata(X) (assert((X)->data != NULL), (X)->data) +/* return X->data only if X and X->data are not NULL */ +#define listgetdata(X) (assert(X), assert((X)->data != NULL), (X)->data) /* Prototypes. */ extern struct list * |