diff options
author | Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp> | 2015-08-26 10:06:43 +0900 |
---|---|---|
committer | Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp> | 2015-08-27 13:52:05 +0900 |
commit | 049a7d41559601f7eab7470f5e8f4bac1140e25a (patch) | |
tree | a0b237c9ff2dca633503d4929fd0bd14a6f2a6be /ivi-layermanagement-api | |
parent | 5626251f7b7ad69079ceb611e640c565e947efc9 (diff) | |
download | wayland-ivi-extension-049a7d41559601f7eab7470f5e8f4bac1140e25a.tar.gz |
ilmClient: 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>
Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Diffstat (limited to 'ivi-layermanagement-api')
-rw-r--r-- | ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c b/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c index 785582d..55b1621 100644 --- a/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c +++ b/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c @@ -259,7 +259,6 @@ create_client_surface(struct ilm_client_context *ctx, ctx_surf->surface = surface; ctx_surf->id_surface = id_surface; - wl_list_init(&ctx_surf->link); wl_list_insert(&ctx->list_surface, &ctx_surf->link); } |