ivi-shell: remove redundant wl_list_empty/init calls
authorUcan, Emre (ADITG/SW1) <eucan@de.adit-jv.com>
Thu, 20 Aug 2015 14:13:33 +0000 (14:13 +0000)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 21 Aug 2015 09:03:33 +0000 (12:03 +0300)
commitcf34dc2334729a152a9a952b65c3b05f3cc0454e
tree53c06e422d5715453ed17c1c262b43fbde0cdffc
parent174257bdf82dd62596d330b8f12bc1a6d6d935bb
ivi-shell: remove redundant wl_list_empty/init calls

Checking wl_list_empty() on a link offers no information: if it returns
true, wl_list_remove() is safe to do. If it returns false, you still do
not know if wl_list_remove() is safe; the link could be part of a list,
or the link could be "uninitialized" (e.g. just wl_list_remove()'d).
(From Pekka Paalanen's comment at
http://lists.freedesktop.org/archives/wayland-devel/2015-August/023987.html).

Calling wl_list_init just before wl_list_insert is redundant.  Because
the links of the list are not read before it is overwritten by
wl_list_insert.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
[Pekka: line-wrapped commit message]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
ivi-shell/ivi-layout.c