SLIST add function to debug length
This commit is contained in:
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user