ilmClient: remove double-loop without purpose
authorMarcus Fritzsch <marcus.fritzsch@xse.de>
Wed, 30 Jul 2014 15:16:02 +0000 (17:16 +0200)
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
Tue, 12 Aug 2014 13:15:15 +0000 (22:15 +0900)
Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c

index 1476d3c..87ba8d6 100644 (file)
@@ -365,18 +365,12 @@ get_surface_context_by_id(struct ilm_client_context *ctx,
 {
     struct surface_context *ctx_surf = NULL;
 
-    /* At first, search cached list */
     wl_list_for_each(ctx_surf, &ctx->list_surface, link) {
         if (ctx_surf->id_surface == id_surface) {
             return ctx_surf;
         }
     }
 
-    wl_list_for_each(ctx_surf, &ctx->list_surface, link) {
-        if (ctx_surf->id_surface == id_surface) {
-            return ctx_surf;
-        }
-    }
     return NULL;
 }