--- ptrlist.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ptrlist.c b/ptrlist.c index cdc4ae4b0..b4fb3fd6e 100644 --- a/ptrlist.c +++ b/ptrlist.c @@ -232,10 +232,13 @@ void * delete_ptr_list_last(struct ptr_list **head) void concat_ptr_list(struct ptr_list *a, struct ptr_list **b) { - void *entry; - FOR_EACH_PTR(a, entry) { - add_ptr_list(b, entry); - } END_FOR_EACH_PTR(entry); + struct ptr_cur cur; + + if (!ptr_cur_beg(&cur, a)) + return; + + while (ptr_cur_next(&cur)) + __add_ptr_list(b, ptr_cur_entry(&cur), 0); } void __free_ptr_list(struct ptr_list **listp) -- 2.13.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html