From: Seunghun Lee Date: Wed, 13 May 2020 08:14:18 +0000 (+0900) Subject: subsurface: remove useless 'if' statement. X-Git-Tag: submit/tizen/20200825.082113~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f600ddfc3dded1d2759b8588cfe86bd052809d9d;p=platform%2Fupstream%2Fenlightenment.git subsurface: remove useless 'if' statement. it cannot reach here if 'epc' is null. Change-Id: I3d4f2b18ffd578894077007cf1f6b3ec6ae0f1d1 --- diff --git a/src/bin/e_comp_wl_subsurface.c b/src/bin/e_comp_wl_subsurface.c index 96e32406a4..95e68f10a2 100644 --- a/src/bin/e_comp_wl_subsurface.c +++ b/src/bin/e_comp_wl_subsurface.c @@ -953,24 +953,21 @@ e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl_ if (offscreen_parent) ELOGF("COMP", " |offscreen_parent:%p", ec, offscreen_parent); - if (epc) - { - if (epc->frame) - { - E_Layer layer = e_client_layer_get(epc); - if (layer > E_LAYER_BOTTOM) e_client_layer_set(ec, layer); - } - - if (epc->comp_data) - { - /* append this client to the parents subsurface list */ - epc->comp_data->sub.list = - eina_list_append(epc->comp_data->sub.list, ec); - epc->comp_data->sub.list_changed = EINA_TRUE; - } - - /* TODO: add callbacks ?? */ - } + if (epc->frame) + { + E_Layer layer = e_client_layer_get(epc); + if (layer > E_LAYER_BOTTOM) e_client_layer_set(ec, layer); + } + + if (epc->comp_data) + { + /* append this client to the parents subsurface list */ + epc->comp_data->sub.list = + eina_list_append(epc->comp_data->sub.list, ec); + epc->comp_data->sub.list_changed = EINA_TRUE; + } + + /* TODO: add callbacks ?? */ ec->comp_data->surface = surface_resource; ec->comp_data->sub.data = sdata;