SLIST add function to debug length

This commit is contained in:
Peter Lieven
2012-10-26 18:10:26 +02:00
parent 89e918e9d7
commit 48e55669e3

View File

@@ -49,4 +49,15 @@
(*list) = head; \
}
#define SLIST_LENGTH(list,length) \
do { \
(length) = 0; \
void *head = (*list); \
while ((*list)) { \
(*list) = (*list)->next; \
(length)++; \
} \
(*list) = head; \
} while (0);
#endif /* __iscsi_slist_h__ */