evas_tbm: fix incorrect return value of eng_output_setup()
authorWonsik, Jung <sidein@samsung.com>
Fri, 17 Nov 2017 09:02:50 +0000 (18:02 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Thu, 21 Dec 2017 01:17:20 +0000 (10:17 +0900)
Fix incorrect return value of eng_output_setup()

Change-Id: Ia8beb0d1d41c9d38cf0210baa3564f7464b7c249

src/modules/evas/engines/gl_tbm/evas_engine.c
src/modules/evas/engines/software_tbm/evas_engine.c

index 630f586..1b21eda 100644 (file)
@@ -942,7 +942,7 @@ _eng_swap_mode_get(void)
    return swap_mode;
 }
 
-static int
+static void *
 eng_output_setup(void *engine, void *info, unsigned int w, unsigned int h)
 {
    Render_Output_Swap_Mode swap_mode = MODE_FULL;
@@ -1048,11 +1048,11 @@ eng_output_setup(void *engine, void *info, unsigned int w, unsigned int h)
 
    eng_window_use(eng_get_ob(re));
 
-   return 1;
+   return re;
 
 ob_err:
    free(re);
-   return 0;
+   return NULL;
 }
 
 static int
index acf5555..7919cc4 100644 (file)
@@ -112,7 +112,7 @@ eng_output_info_setup(void *info)
    einfo->render_mode = EVAS_RENDER_MODE_BLOCKING;
 }
 
-static int
+static void *
 eng_output_setup(void *engine, void *info, unsigned int w, unsigned int h)
 {
    Evas_Engine_Info_Software_Tbm *einfo;
@@ -121,7 +121,7 @@ eng_output_setup(void *engine, void *info, unsigned int w, unsigned int h)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    /* try to cast to our engine info */
    if (!(einfo = (Evas_Engine_Info_Software_Tbm *)info))
-     return 0;
+     return NULL;
 
    /* if we have no engine data, assume we have not initialized yet */
    evas_common_init();
@@ -137,11 +137,11 @@ eng_output_setup(void *engine, void *info, unsigned int w, unsigned int h)
    else
      goto err;
 
-   return 1;
+   return re;
 
 err:
    evas_common_shutdown();
-   return 0;
+   return NULL;
 }
 
 static void