subsurface: remove useless 'if' statement. 20/241220/2
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 13 May 2020 08:14:18 +0000 (17:14 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Sun, 23 Aug 2020 23:36:23 +0000 (23:36 +0000)
it cannot reach here if 'epc' is null.

Change-Id: I3d4f2b18ffd578894077007cf1f6b3ec6ae0f1d1

src/bin/e_comp_wl_subsurface.c

index 96e32406a4247f4b624db8eba37650486f1ac7ec..95e68f10a21b7c3115658f5f3a7af82c14b44560 100644 (file)
@@ -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;