From: Jeremy Kerr Date: Wed, 1 May 2013 05:11:17 +0000 (+0800) Subject: lib/list: Fix handling of empty lists X-Git-Tag: v1.0.0~684 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=0fad1573c93563fcd62c992d73e9d25161b80076;hp=0fad1573c93563fcd62c992d73e9d25161b80076;p=petitboot lib/list: Fix handling of empty lists 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 Signed-off-by: Geoff Levand ---