]> git.ozlabs.org Git - petitboot/commitdiff
lib/list: Fix handling of empty lists
authorJeremy Kerr <jk@ozlabs.org>
Wed, 1 May 2013 05:11:17 +0000 (13:11 +0800)
committerGeoff Levand <geoff@infradead.org>
Fri, 3 May 2013 23:20:29 +0000 (16:20 -0700)
The current list_for_each_entry_safe marco SEGVs on empty lists; the
list_entry will give us a NULL tmp on the first iteration.

This change removes the use of list_entry, as we're effectively
by-passing its NULL return semantics with our own.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>

No differences found