e_comp_wl_video: Make boolean for return value of init() 93/258593/1
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 12 May 2021 07:13:03 +0000 (16:13 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Thu, 20 May 2021 04:20:26 +0000 (13:20 +0900)
This patch is to improve consistency and readability.
And there is no functional changes.

Change-Id: I55bd4bf3d34f0285bdf8fbdbee6638f0bec29cf3

src/bin/video/e_comp_wl_video.c
src/bin/video/e_comp_wl_video.h

index a827522..922e39a 100644 (file)
@@ -422,14 +422,14 @@ _e_comp_wl_video_info_cb_video_punch(void *data, const char *log_path)
    e_video_debug_punch_set(!flag);
 }
 
-EINTERN int
+EINTERN Eina_Bool
 e_comp_wl_video_init(void)
 {
    struct wl_global *global;
 
-   if (!e_comp_wl) return 0;
-   if (!e_comp_wl->wl.disp) return 0;
-   if (e_comp->wl_comp_data->video.global) return 1;
+   if (!e_comp_wl) return EINA_FALSE;
+   if (!e_comp_wl->wl.disp) return EINA_FALSE;
+   if (e_comp->wl_comp_data->video.global) return EINA_TRUE;
 
    /* try to add tizen_video to wayland globals */
    global = wl_global_create(e_comp_wl->wl.disp, &tizen_video_interface,
@@ -437,7 +437,7 @@ e_comp_wl_video_init(void)
    if (!global)
      {
         ERR("Could not add tizen_video to wayland globals");
-        return 0;
+        return EINA_FALSE;
      }
 
    e_comp->wl_comp_data->video.global = global;
@@ -452,7 +452,7 @@ e_comp_wl_video_init(void)
    e_info_server_hook_set("video-to-primary", _e_comp_wl_video_info_cb_video_to_primary, NULL);
    e_info_server_hook_set("video-punch", _e_comp_wl_video_info_cb_video_punch, NULL);
 
-   return 1;
+   return EINA_TRUE;
 }
 
 EINTERN void
index ce93c4f..7e39a2a 100644 (file)
@@ -6,8 +6,8 @@
 
 #define E_COMP_WL
 
-EINTERN int e_comp_wl_video_init(void);
-EINTERN void e_comp_wl_video_shutdown(void);
+EINTERN Eina_Bool  e_comp_wl_video_init(void);
+EINTERN void       e_comp_wl_video_shutdown(void);
 
 #define C(b,m)              (((b) >> (m)) & 0xFF)
 #define FOURCC_STR(id)      C(id,0), C(id,8), C(id,16), C(id,24)