From 5417849600e522703078f7cc7f1296507b7eb709 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Tue, 7 Feb 2023 16:57:47 +0900 Subject: [PATCH] e_hwc_window: remove unnecessary initailizing pointer Change-Id: I37164e540684057d25b7cc229aff1f606136c78d --- src/bin/e_hwc_window.c | 90 +++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/src/bin/e_hwc_window.c b/src/bin/e_hwc_window.c index 9e0f646..2628ed7 100644 --- a/src/bin/e_hwc_window.c +++ b/src/bin/e_hwc_window.c @@ -165,8 +165,8 @@ _e_hwc_window_comp_wl_buffer_get(E_Hwc_Window *hwc_window) struct wayland_tbm_client_queue * e_hwc_window_wayland_tbm_client_queue_get(E_Hwc_Window *hwc_window) { - struct wayland_tbm_client_queue * cqueue = NULL; - struct wl_resource *wl_surface = NULL; + struct wayland_tbm_client_queue * cqueue; + struct wl_resource *wl_surface; E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data; E_Comp_Wl_Client_Data *cdata; E_Client *ec; @@ -221,7 +221,7 @@ _get_composition_type(E_Hwc_Window_State state) static void _e_hwc_window_buffer_cb_queue_destroy(struct wl_listener *listener, void *data) { - E_Hwc_Window_Buffer *window_buffer = NULL; + E_Hwc_Window_Buffer *window_buffer; window_buffer = container_of(listener, E_Hwc_Window_Buffer, queue_destroy_listener); EINA_SAFETY_ON_NULL_RETURN(window_buffer); @@ -279,7 +279,7 @@ e_hwc_window_buffer_set(E_Hwc_Window_Buffer *window_buffer, static void _e_hwc_window_cb_queue_destroy(struct wl_listener *listener, void *data) { - E_Hwc_Window *hwc_window = NULL; + E_Hwc_Window *hwc_window; hwc_window = container_of(listener, E_Hwc_Window, queue_destroy_listener); EINA_SAFETY_ON_NULL_RETURN(hwc_window); @@ -299,7 +299,7 @@ _e_hwc_window_cb_queue_destroy(struct wl_listener *listener, void *data) static Eina_Bool _e_hwc_window_buffer_queue_set(E_Hwc_Window *hwc_window) { - E_Hwc_Window_Queue *queue = NULL; + E_Hwc_Window_Queue *queue; queue = e_hwc_window_queue_user_set(hwc_window); if (!queue) @@ -388,7 +388,7 @@ _e_hwc_window_client_surface_acquire(E_Hwc_Window *hwc_window) static void _e_hwc_window_cb_cursor_buffer_destroy(struct wl_listener *listener, void *data) { - E_Hwc_Window *hwc_window = NULL; + E_Hwc_Window *hwc_window; hwc_window = container_of(listener, E_Hwc_Window, cursor_buffer_destroy_listener); EINA_SAFETY_ON_NULL_RETURN(hwc_window); @@ -408,8 +408,8 @@ static Eina_Bool _e_hwc_window_cursor_image_update(E_Hwc_Window *hwc_window) { E_Client *ec = hwc_window->ec; - E_Comp_Wl_Buffer *buffer = NULL; - E_Pointer *pointer = NULL; + E_Comp_Wl_Buffer *buffer; + E_Pointer *pointer; int img_w, img_h, img_stride; void *img_ptr = NULL; tdm_error error; @@ -578,10 +578,10 @@ _e_hwc_window_update_fps(E_Hwc_Window *hwc_window) static void _e_hwc_window_free(E_Hwc_Window *hwc_window) { - E_Hwc *hwc = NULL; + E_Hwc *hwc; Hwc_Window_Prop *prop; - E_Output *output = NULL; - tdm_output *toutput = NULL; + E_Output *output; + tdm_output *toutput; hwc = hwc_window->hwc; EINA_SAFETY_ON_NULL_GOTO(hwc, done); @@ -647,7 +647,7 @@ done: static void _e_hwc_window_del(E_Hwc_Window *hwc_window) { - E_Client *ec = NULL; + E_Client *ec; EINA_SAFETY_ON_NULL_RETURN(hwc_window); @@ -704,7 +704,7 @@ _e_hwc_window_cb_ec_free(void *data, void *obj) static E_Hwc_Window * _e_hwc_window_new(E_Hwc *hwc, E_Client *ec, E_Hwc_Window_State state) { - E_Hwc_Window *hwc_window = NULL; + E_Hwc_Window *hwc_window; tdm_hwc *thwc;; tdm_error error; @@ -870,7 +870,7 @@ _e_hwc_window_client_cb_zone_set(void *data, int type, void *event) E_Client *ec; E_Zone *zone; E_Output *output; - E_Hwc_Window *hwc_window = NULL; + E_Hwc_Window *hwc_window; Eina_Bool is_video = EINA_FALSE; ev = event; @@ -1093,10 +1093,10 @@ e_hwc_window_video_set(E_Hwc_Window *hwc_window, Eina_Bool set) static Eina_Bool _e_hwc_window_cursor_info_get(E_Hwc_Window *hwc_window, tdm_hwc_window_info *hwc_win_info) { - E_Hwc *hwc = NULL; - E_Output *output = NULL; - E_Client *ec = NULL; - E_Pointer *pointer = NULL; + E_Hwc *hwc; + E_Output *output; + E_Client *ec; + E_Pointer *pointer; E_Zone *zone; int rotation; @@ -1183,10 +1183,10 @@ _e_hwc_window_cursor_info_get(E_Hwc_Window *hwc_window, tdm_hwc_window_info *hwc static Eina_Bool _e_hwc_window_info_get(E_Hwc_Window *hwc_window, tdm_hwc_window_info *hwc_win_info) { - E_Hwc *hwc = NULL; - E_Output *output = NULL; - E_Client *ec = NULL; - tbm_surface_h tsurface = NULL; + E_Hwc *hwc; + E_Output *output; + E_Client *ec; + tbm_surface_h tsurface; tbm_surface_info_s surf_info = {0}; E_Zone *zone; int transform; @@ -1267,7 +1267,7 @@ static Eina_Bool _e_hwc_window_target_info_get(E_Hwc_Window *hwc_window, tdm_hwc_window_info *hwc_win_info) { E_Output *output; - tbm_surface_h tsurface = NULL; + tbm_surface_h tsurface; tbm_surface_info_s surf_info = {0}; if (!e_hwc_window_is_target(hwc_window)) return EINA_FALSE; @@ -1319,7 +1319,7 @@ _e_hwc_window_target_info_get(E_Hwc_Window *hwc_window, tdm_hwc_window_info *hwc static Eina_Bool _e_hwc_window_video_info_get(E_Hwc_Window *hwc_window, tdm_hwc_window_info *hwc_win_info) { - E_Client *ec = NULL; + E_Client *ec; E_Client_Video_Info vinfo; E_Zone *zone; E_Hwc *hwc; @@ -1553,9 +1553,9 @@ _e_hwc_window_buffer_set(E_Hwc_Window *hwc_window, tbm_surface_h tsurface, EINTERN Eina_Bool e_hwc_window_buffer_fetch(E_Hwc_Window *hwc_window) { - tbm_surface_h tsurface = NULL; - E_Client *ec = NULL; - E_Comp_Wl_Buffer *comp_buffer = NULL; + tbm_surface_h tsurface; + E_Client *ec; + E_Comp_Wl_Buffer *comp_buffer; EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window->hwc, EINA_FALSE); @@ -1621,7 +1621,7 @@ e_hwc_window_prop_update(E_Hwc_Window *hwc_window) EINTERN E_Hwc_Window_Commit_Data * e_hwc_window_commit_data_acquire(E_Hwc_Window *hwc_window) { - E_Hwc_Window_Commit_Data *commit_data = NULL; + E_Hwc_Window_Commit_Data *commit_data; E_Comp_Wl_Buffer *comp_buffer; if (hwc_window->accepted_state == E_HWC_WINDOW_STATE_CURSOR) @@ -1777,9 +1777,9 @@ e_hwc_window_presentation_time_feedback_discard(E_Hwc_Window *hwc_window) EINTERN Eina_Bool e_hwc_window_commit_data_release(E_Hwc_Window *hwc_window, E_Hwc_Window_Commit_Data *commit_data) { - tbm_surface_h tsurface = NULL; - E_Hwc_Window_Queue *queue = NULL; - E_Hwc_Window_Queue_Buffer *queue_buffer = NULL; + tbm_surface_h tsurface; + E_Hwc_Window_Queue *queue; + E_Hwc_Window_Queue_Buffer *queue_buffer; /* we don't have data to release */ if (!commit_data) return EINA_FALSE; @@ -1882,7 +1882,7 @@ _e_hwc_window_cqueue_destroy_cb(struct wayland_tbm_client_queue *cqueue, void *d EINTERN Eina_Bool e_hwc_window_activate(E_Hwc_Window *hwc_window, E_Hwc_Window_Queue *queue) { - struct wayland_tbm_client_queue *cqueue = NULL; + struct wayland_tbm_client_queue *cqueue; int flush = 0; int queue_size = 0, queue_width = 0, queue_height = 0; @@ -2093,10 +2093,10 @@ _e_hwc_window_client_transform_device_state_available_get(E_Client *ec) EINTERN Eina_Bool e_hwc_window_device_state_available_update(E_Hwc_Window *hwc_window) { - E_Client *ec = NULL; + E_Client *ec; E_Comp_Wl_Client_Data *cdata; - E_Pixmap *pixmap = NULL; - E_Output *eout = NULL; + E_Pixmap *pixmap; + E_Output *eout; int minw = 0, minh = 0; int transform; Eina_Bool available = EINA_TRUE; @@ -2369,10 +2369,10 @@ e_hwc_window_constraints_update(E_Hwc_Window *hwc_window) static Eina_Bool _e_hwc_window_client_recover(E_Hwc_Window *hwc_window, Eina_Bool *clear_attach) { - E_Comp_Wl_Buffer *recover_buffer = NULL;; + E_Comp_Wl_Buffer *recover_buffer; E_Comp_Wl_Buffer *comp_wl_buffer; - tbm_surface_h tsurface =NULL; - E_Client *ec = NULL; + tbm_surface_h tsurface; + E_Client *ec; Eina_Bool new_buffer = EINA_FALSE; if (hwc_window->is_deleted) return EINA_FALSE; @@ -2432,7 +2432,7 @@ _e_hwc_window_client_recover(E_Hwc_Window *hwc_window, Eina_Bool *clear_attach) static Eina_Bool _e_hwc_window_rendered_window_set(E_Hwc_Window *hwc_window, Eina_Bool set) { - E_Client *ec = NULL; + E_Client *ec; Eina_Bool ret; Eina_Bool clear_attach = EINA_FALSE; @@ -2487,7 +2487,7 @@ _e_hwc_window_rendered_window_set(E_Hwc_Window *hwc_window, Eina_Bool set) EINTERN Eina_Bool e_hwc_window_rendered_window_update(E_Hwc_Window *hwc_window) { - E_Client *ec = NULL; + E_Client *ec; E_Pointer *pointer = NULL; E_Hwc_Window_State state; @@ -2692,7 +2692,7 @@ e_hwc_window_name_get(E_Hwc_Window *hwc_window) EINTERN void e_hwc_window_name_set(E_Hwc_Window *hwc_window) { - const char *name = NULL; + const char *name; tdm_error ret; Eina_Bool no_name = EINA_FALSE; @@ -2719,9 +2719,9 @@ e_hwc_window_name_set(E_Hwc_Window *hwc_window) EINTERN Eina_Bool e_hwc_window_set_property(E_Hwc_Window *hwc_window, unsigned int id, const char *name, tdm_value value, Eina_Bool force) { - E_Client *ec = NULL; - const Eina_List *l = NULL; - Hwc_Window_Prop *prop = NULL; + E_Client *ec; + const Eina_List *l; + Hwc_Window_Prop *prop; tdm_error ret; EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE); @@ -2795,7 +2795,7 @@ e_hwc_window_pending_update_data_dequeue(E_Hwc_Window *hwc_window) E_Client *ec; E_Hwc_Window_Update_Data *update; E_Comp_Wl_Buffer *comp_buffer; - tbm_surface_h tsurface = NULL; + tbm_surface_h tsurface; EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, NULL); EINA_SAFETY_ON_TRUE_RETURN_VAL(hwc_window->is_target, NULL); -- 2.7.4