On Tue, May 5, 2015 at 11:25 AM, Neil Roberts wrote:
> Jason Ekstrand writes:
>
>> +static inline void list_validate(struct list_head *list)
>> +{
>> + assert(list->next->prev == list && list->prev->next == list);
>> + for (struct list_head *node = list->next; node != list; node =
>> node->n
Jason Ekstrand writes:
> +static inline void list_validate(struct list_head *list)
> +{
> + assert(list->next->prev == list && list->prev->next == list);
> + for (struct list_head *node = list->next; node != list; node = node->next)
> + assert(node->next->prev == node && node->prev->next
---
src/util/list.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/src/util/list.h b/src/util/list.h
index 246f826..f11b858 100644
--- a/src/util/list.h
+++ b/src/util/list.h
@@ -105,6 +105,13 @@ static inline unsigned list_length(struct list_head *list)
return length;
}
+static