Fixed: Coding rule issues. 52/90352/1 accepted/tizen/3.0/ivi/20161011.065207 accepted/tizen/3.0/mobile/20161015.033656 accepted/tizen/3.0/tv/20161016.005024 accepted/tizen/common/20161006.153631 accepted/tizen/ivi/20161006.080224 accepted/tizen/mobile/20161006.080133 accepted/tizen/tv/20161006.080149 submit/tizen/20161006.010203 submit/tizen_3.0_ivi/20161010.000007 submit/tizen_3.0_mobile/20161015.000004 submit/tizen_3.0_tv/20161015.000003
authorNishant Chaprana <n.chaprana@samsung.com>
Thu, 29 Sep 2016 10:42:04 +0000 (16:12 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Thu, 29 Sep 2016 12:28:09 +0000 (17:58 +0530)
Change-Id: I46301868c53271c0b6db9b954c3764e0327fe1d4
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
15 files changed:
popup-wifidirect/include/wfd-app-util.h
popup-wifidirect/src/wfd-app-client.c
popup-wifidirect/src/wfd-app-main.c
popup-wifidirect/src/wfd-app-popup-view.c
popup-wifidirect/src/wfd-app-util.c
ug-wifidirect/include/wfd_motion_control.h
ug-wifidirect/include/wfd_ug.h
ug-wifidirect/src/wfd_client.c
ug-wifidirect/src/wfd_motion_control.c
ug-wifidirect/src/wfd_ug.c
ug-wifidirect/src/wfd_ug_genlist.c
ug-wifidirect/src/wfd_ug_main_view.c
ug-wifidirect/src/wfd_ug_multiconnect_view.c
ug-wifidirect/src/wfd_ug_popup.c
ug-wifidirect/src/wfd_ug_rename_popup.c

index b6a16b3..e1adb1d 100755 (executable)
@@ -74,15 +74,15 @@ int wfd_app_gettid();
 
 #define WFD_RET_IF(expr, fmt, args...) \
        do { \
-               if(expr) { \
-                       WFD_APP_LOG(WFD_APP_LOG_ERROR, "[%s] Return, message "fmt, #expr, ##args );\
+               if (expr) { \
+                       WFD_APP_LOG(WFD_APP_LOG_ERROR, "[%s] Return, message "fmt, #expr, ##args);\
                        return; \
                } \
        } while (0)
 
 #define WFD_IF_FREE_MEM(mem) \
        do { \
-               if(mem) { \
+               if (mem) { \
                        free(mem); \
                        mem = NULL; \
                } \
@@ -90,8 +90,8 @@ int wfd_app_gettid();
 
 #define WFD_RETV_IF(expr, val, fmt, args...) \
        do { \
-               if(expr) { \
-                       WFD_APP_LOG(WFD_APP_LOG_ERROR, "[%s] Return value, message "fmt, #expr, ##args );\
+               if (expr) { \
+                       WFD_APP_LOG(WFD_APP_LOG_ERROR, "[%s] Return value, message "fmt, #expr, ##args);\
                        return (val); \
                } \
        } while (0)
index af29d58..43bb060 100644 (file)
@@ -125,9 +125,8 @@ Eina_Bool wfd_automatic_deactivated_for_connection_cb(void *user_data)
 
        /* check the timeout, if not timeout, keep the cb */
        interval = time(NULL) - ad->last_wfd_transmit_time;
-       if (interval < NO_ACTION_TIME_OUT) {
+       if (interval < NO_ACTION_TIME_OUT)
                return ECORE_CALLBACK_RENEW;
-       }
 
        /* get transfer state */
        if (vconf_get_int(VCONFKEY_WIFI_DIRECT_TRANSFER_STATE, &wfd_transfer_state) < 0) {
@@ -137,9 +136,8 @@ Eina_Bool wfd_automatic_deactivated_for_connection_cb(void *user_data)
        }
 
        res = wifi_direct_get_state(&ad->wfd_status);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
+       if (res != WIFI_DIRECT_ERROR_NONE)
                return ECORE_CALLBACK_CANCEL;
-       }
 
        if (ad->wfd_status < WIFI_DIRECT_STATE_CONNECTED) {
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Wi-Fi Direct is unconnected!");
@@ -167,22 +165,20 @@ int wfd_app_client_switch_off(void *data)
 {
        wfd_appdata_t *ad = (wfd_appdata_t *)data;
        int res;
-       if(NULL == ad) {
+       if (NULL == ad) {
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "NULL == ad!\n");
                return -1;
        }
        res = wifi_direct_get_state(&ad->wfd_status);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
+       if (res != WIFI_DIRECT_ERROR_NONE)
                return ECORE_CALLBACK_CANCEL;
-       }
 
        if (ad->wfd_status >= WIFI_DIRECT_STATE_ACTIVATING) {
                /*if connected, disconnect all devices*/
                if (WIFI_DIRECT_STATE_CONNECTED == ad->wfd_status) {
                        res = wifi_direct_disconnect_all();
-                       if (res != WIFI_DIRECT_ERROR_NONE) {
+                       if (res != WIFI_DIRECT_ERROR_NONE)
                                return -1;
-                       }
                }
                res = wifi_direct_deactivate();
                if (res != WIFI_DIRECT_ERROR_NONE) {
@@ -209,9 +205,8 @@ static Eina_Bool _wfd_automatic_deactivated_for_no_connection_cb(void *user_data
        int screen_mirroring_status = 0;
 #endif
 
-       if (NULL == ad) {
+       if (NULL == ad)
                return ECORE_CALLBACK_CANCEL;
-       }
 
        /* check the action, if action is exist, keep the cb */
        res = wifi_direct_get_state(&ad->wfd_status);
@@ -228,9 +223,8 @@ static Eina_Bool _wfd_automatic_deactivated_for_no_connection_cb(void *user_data
 
        /* check the timeout, if not timeout, keep the cb */
        interval = time(NULL) - ad->last_wfd_time;
-       if (interval < MAX_NO_ACTION_TIME_OUT) {
+       if (interval < MAX_NO_ACTION_TIME_OUT)
                return ECORE_CALLBACK_RENEW;
-       }
 
        /* turn off the Wi-Fi Direct */
        wifi_direct_get_state(&ad->wfd_status);
@@ -239,9 +233,7 @@ static Eina_Bool _wfd_automatic_deactivated_for_no_connection_cb(void *user_data
        } else {
 #ifdef WFD_SCREEN_MIRRORING_ENABLED
                if (vconf_get_int(VCONFKEY_SCREEN_MIRRORING_STATE, &screen_mirroring_status) < 0)
-               {
                        WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
-               }
 
                if (screen_mirroring_status == VCONFKEY_SCREEN_MIRRORING_ACTIVATED) {
                        ad->last_wfd_time = time(NULL);
@@ -255,9 +247,8 @@ static Eina_Bool _wfd_automatic_deactivated_for_no_connection_cb(void *user_data
        }
 
        /* reset monitor timer */
-       if (ad->monitor_timer) {
+       if (ad->monitor_timer)
                ad->monitor_timer = NULL;       //ECORE_CALLBACK_CANCEL will release timer.
-       }
 
        return ECORE_CALLBACK_CANCEL;
 }
@@ -446,7 +437,7 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
                                break;
                        }
                        int res = display_change_state(LCD_NORMAL);
-                       if(res < 0)
+                       if (res < 0)
                                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to change PM state(%d)", res);
                }
        }
@@ -597,14 +588,13 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
         */
        /* wifi_direct_get_state(&ad->wfd_status); */
 
-       if (vconf_get_int(VCONFKEY_WIFI_DIRECT_STATE, &wfd_state) < 0) {
+       if (vconf_get_int(VCONFKEY_WIFI_DIRECT_STATE, &wfd_state) < 0)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Error reading vconf (%s)\n", VCONFKEY_WIFI_DIRECT_STATE);
-       }
+
        WFD_APP_LOG(WFD_APP_LOG_LOW, "wfd state: %d", wfd_state);
 
-       if (wfd_state == VCONFKEY_WIFI_DIRECT_DEACTIVATED) {
+       if (wfd_state == VCONFKEY_WIFI_DIRECT_DEACTIVATED)
                wfd_app_util_del_notification(ad);
-       }
 
 #ifdef NOT_CONNECTED_INDICATOR_ICON
        if (wfd_state >= VCONFKEY_WIFI_DIRECT_CONNECTED) {
@@ -614,9 +604,8 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
                } else {
                        noti_err = notification_free(ad->noti_wifi_direct_on);
                        ad->noti_wifi_direct_on = NULL;
-                       if (noti_err != NOTIFICATION_ERROR_NONE) {
+                       if (noti_err != NOTIFICATION_ERROR_NONE)
                                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
-                       }
                }
        }
 #endif
@@ -731,19 +720,16 @@ int deinit_wfd_client(wfd_appdata_t *ad)
 #endif
 
        ret = wifi_direct_unset_device_state_changed_cb();
-       if (ret != WIFI_DIRECT_ERROR_NONE) {
+       if (ret != WIFI_DIRECT_ERROR_NONE)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to deregister _cb_activation(%d)\n", ret);
-       }
 
        ret = wifi_direct_unset_connection_state_changed_cb();
-       if (ret != WIFI_DIRECT_ERROR_NONE) {
+       if (ret != WIFI_DIRECT_ERROR_NONE)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to deregister _cb_connection(%d)\n", ret);
-       }
 
        ret = wifi_direct_deinitialize();
-       if (ret != WIFI_DIRECT_ERROR_NONE) {
+       if (ret != WIFI_DIRECT_ERROR_NONE)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to deinitialize Wi-Fi Direct. error code = [%d]\n", ret);
-       }
 
        __WFD_APP_FUNC_EXIT__;
        return 0;
index 2aba656..3067c67 100644 (file)
@@ -163,18 +163,17 @@ static void _app_terminate(void *data)
        wfd_app_util_del_notification(ad);
 
        ret = wfd_app_util_deregister_vconf_callbacks(ad);
-       if (ret < 0) {
+       if (ret < 0)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to register vconf notification");
-       }
 
        /* Deregister Hardkey CB */
        wfd_app_util_deregister_hard_key_down_cb(ad);
 
        /* Deinitializes feedback API */
        ret = feedback_deinitialize();
-       if (ret != FEEDBACK_ERROR_NONE) {
+       if (ret != FEEDBACK_ERROR_NONE)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "feedback_deinitialize error : %d\n", ret);
-       }
+
        if (ad->transmit_timer) {
                ecore_timer_del(ad->transmit_timer);
                ad->transmit_timer = NULL;
@@ -183,9 +182,8 @@ static void _app_terminate(void *data)
        wfd_destroy_popup();
 
        ret = deinit_wfd_client(ad);
-       if (ret < 0) {
+       if (ret < 0)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "deinit_wfd_client error\n");
-       }
 
        if (ad->back_grnd) {
                evas_object_del(ad->back_grnd);
@@ -268,11 +266,11 @@ static void _app_reset(app_control_h control, void *data)
                app_control_set_app_id(ug_control, "setting-wifidirect-efl");
 
                ret = app_control_send_launch_request(ug_control, NULL, NULL);
-               if(ret == APP_CONTROL_ERROR_NONE) {
+               if (ret == APP_CONTROL_ERROR_NONE)
                        WFD_APP_LOG(WFD_APP_LOG_LOW, "Launch Wi-Fi Direct successful");
-               } else {
+               else
                        WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to launch Wi-Fi Direct");
-               }
+
                app_control_destroy(ug_control);
 
        }
index a669fb7..b6e8ff2 100755 (executable)
@@ -52,9 +52,8 @@ void _replace_1PS_2PD(char *buf, int buf_len, char *format_str, char* SD_1, int
 static void mouseup_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
        Evas_Event_Mouse_Up *ev = event_info;
-       if (ev->button == 3) {
+       if (ev->button == 3)
                evas_object_del(obj);
-       }
 }
 
 /*static void keydown_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
@@ -247,9 +246,8 @@ void wfd_destroy_popup()
                ad->popup_timeout_handle = 0;
        }
 
-       if (ad->win) {
+       if (ad->win)
                evas_object_hide(ad->win);
-       }
 
        if (pb_timer) {
                ecore_timer_del(pb_timer);
@@ -376,9 +374,8 @@ static void _wfd_ug_automatic_turn_off_popup_cb(void *data, Evas_Object *obj, vo
                ad->popup = NULL;
        }
 
-       if (ad->win) {
+       if (ad->win)
                evas_object_hide(ad->win);
-       }
 
        __WFD_APP_FUNC_EXIT__;
 }
@@ -494,17 +491,15 @@ static Eina_Bool _fn_pb_timer(void *data)
 
        /* show the time label */
        if (step < 60) {
-               if (step < 10) {
+               if (step < 10)
                        snprintf(time_label, 32, "00:0%d", step);
-               } else {
+               else
                        snprintf(time_label, 32, "00:%d", step);
-               }
        } else {
-               if (step%60 < 10) {
+               if (step%60 < 10)
                        snprintf(time_label, 32, "0%d:0%d", step/60, step%60);
-               } else {
+               else
                        snprintf(time_label, 32, "0%d:%d", step/60, step%60);
-               }
        }
 
        char *remaining_time_str = g_strdup_printf(
@@ -534,7 +529,7 @@ static Eina_Bool _keypad_popup_timer_cb(void *data)
                return ECORE_CALLBACK_CANCEL;
        }
 
-       keypad_popup_timeout --;
+       keypad_popup_timeout--;
 
        if (keypad_popup_timeout > 0) {
                _replace_1PS_2PD((char *)msg1, sizeof(msg1),
@@ -717,7 +712,7 @@ Evas_Object *wfd_draw_pop_type_display(Evas_Object * win, wfd_popup_t * pop)
                                (void *) (intptr_t) pop->resp_data2);
        }
 
-       if (pop->resp_data1 == WFD_POP_RESP_APRV_CONNECT_KEYPAD_YES || pop->resp_data1 == WFD_POP_RESP_APRV_CONNECT_PBC_YES ) {
+       if (pop->resp_data1 == WFD_POP_RESP_APRV_CONNECT_KEYPAD_YES || pop->resp_data1 == WFD_POP_RESP_APRV_CONNECT_PBC_YES) {
                Evas_Object *btn1 = NULL;
                btn1 = elm_button_add(popup);
                elm_object_style_set(btn1, "popup");
@@ -790,9 +785,8 @@ static void _entry_keydown_cb(void *data, Evas *e, Evas_Object *obj,
                Ecore_IMF_Context *imf_context;
 
                imf_context = (Ecore_IMF_Context*)elm_entry_imf_context_get(entry);
-               if (imf_context) {
+               if (imf_context)
                        ecore_imf_context_input_panel_hide(imf_context);
-               }
 
                elm_object_focus_set(entry, EINA_FALSE);
        }
@@ -802,9 +796,9 @@ static char *__wfd_main_desc_label_get(void *data, Evas_Object *obj,
                const char *part)
 {
        __WFD_APP_FUNC_ENTER__;
-       if (obj == NULL || part == NULL) {
+       if (obj == NULL || part == NULL)
                return NULL;
-       }
+
        WFD_APP_LOG(WFD_APP_LOG_LOW, "wfd_rename desc\n");
        char buf[WFD_POP_STR_MAX_LEN] = {0, };
        char msg1[WFD_POP_STR_MAX_LEN] = {0, };
@@ -816,9 +810,9 @@ static char *__wfd_main_desc_label_get(void *data, Evas_Object *obj,
        WFD_RETV_IF(connection == NULL, NULL, "Incorrect parameter(NULL)\n");
 
        if (!strcmp("elm.text.multiline", part)) {
-               if (keypad_popup_timeout > 0) {
+               if (keypad_popup_timeout > 0)
                                ad->timeout = keypad_popup_timeout;
-               }
+
                _replace_1PS_2PD((char *)msg1, WFD_POP_STR_MAX_LEN,
                                D_("IDS_ST_BODY_CONNECT_WITH_PS_IN_PD_SECS_ABB"),
                                connection->peer_name, ad->timeout);
@@ -841,9 +835,9 @@ static Evas_Object *__wfd_pin_entry_icon_get(void *data, Evas_Object *obj,
                const char *part)
 {
        __WFD_APP_FUNC_ENTER__;
-       if (obj == NULL || part == NULL) {
+       if (obj == NULL || part == NULL)
                return NULL;
-       }
+
        wfd_appdata_t *ad = wfd_get_appdata();
        WFD_RETV_IF(ad == NULL, NULL, "Incorrect parameter(NULL)\n");
        Evas_Object *entry = NULL;
@@ -867,13 +861,13 @@ static Evas_Object *__wfd_pin_entry_icon_get(void *data, Evas_Object *obj,
        elm_entry_prediction_allow_set(entry, EINA_FALSE);
 
        elm_entry_markup_filter_append(entry,
-                       elm_entry_filter_accept_set,&accept_set);
+                       elm_entry_filter_accept_set, &accept_set);
        elm_entry_input_panel_layout_set(entry,
                        ELM_INPUT_PANEL_LAYOUT_DATETIME);
        elm_object_signal_emit(entry, "elm,action,hide,search_icon", "");
        elm_object_domain_translatable_part_text_set(entry, "elm.guide",
                         PACKAGE, D_("IDS_WIFI_POP_PIN"));
-       elm_entry_input_panel_return_key_autoenabled_set(entry,EINA_TRUE);
+       elm_entry_input_panel_return_key_autoenabled_set(entry, EINA_TRUE);
        elm_entry_input_panel_return_key_type_set(entry,
                        ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
 
@@ -891,7 +885,7 @@ static Evas_Object *__wfd_pin_entry_icon_get(void *data, Evas_Object *obj,
        evas_object_smart_callback_add(button, "clicked",
                        __popup_eraser_clicked_cb, entry);
 
-       elm_object_signal_emit (entry, "elm,action,hide,search_icon", "");
+       elm_object_signal_emit(entry, "elm,action,hide,search_icon", "");
        evas_object_smart_callback_add(entry, "changed",
                        _entry_changed_cb, NULL);
        evas_object_smart_callback_add(entry, "preedit,changed",
@@ -901,7 +895,7 @@ static Evas_Object *__wfd_pin_entry_icon_get(void *data, Evas_Object *obj,
        evas_object_event_callback_add(entry, EVAS_CALLBACK_KEY_DOWN,
                        _entry_keydown_cb, ad);
 
-       elm_object_content_set(obj,entry);
+       elm_object_content_set(obj, entry);
        evas_object_show(entry);
        evas_object_smart_callback_add(entry, "changed", _smart_ime_cb, NULL);
        elm_object_focus_set(entry, EINA_TRUE);
@@ -912,15 +906,15 @@ static Evas_Object *__wfd_pin_entry_icon_get(void *data, Evas_Object *obj,
 static void _chk_changed_cb(void *data, Evas_Object *obj, void *ei)
 {
        __WFD_APP_FUNC_ENTER__;
-       if (obj == NULL || data == NULL) {
+       if (obj == NULL || data == NULL)
                return;
-       }
+
        Eina_Bool state = elm_check_state_get(obj);
-       if (state) {
+       if (state)
                elm_entry_password_set((Evas_Object *)data, EINA_FALSE);
-       } else {
+       else
                elm_entry_password_set((Evas_Object *)data, EINA_TRUE);
-       }
+
        __WFD_APP_FUNC_EXIT__;
 }
 
@@ -929,9 +923,9 @@ static void _gl_pswd_check_box_sel(void *data, Evas_Object *obj, void *ei)
        __WFD_APP_FUNC_ENTER__;
        Elm_Object_Item *item = NULL;
        item = (Elm_Object_Item *)ei;
-       if (item == NULL) {
+       if (item == NULL)
                return;
-       }
+
        wfd_appdata_t *ad = wfd_get_appdata();
        if (ad == NULL) {
                WFD_APP_LOG(WFD_APP_LOG_LOW, "Incorrect parameter(NULL)\n");
@@ -941,9 +935,9 @@ static void _gl_pswd_check_box_sel(void *data, Evas_Object *obj, void *ei)
        elm_genlist_item_selected_set(item, EINA_FALSE);
        Eina_Bool state = elm_check_state_get(ck);
        elm_check_state_set(ck, !state);
-       if (ad) {
+       if (ad)
                _chk_changed_cb(ad->pin_entry, ck, NULL);
-       }
+
        __WFD_APP_FUNC_EXIT__;
 }
 
@@ -951,9 +945,9 @@ static char *__wfd_password_label(void *data, Evas_Object *obj, const char *part
 {
        __WFD_APP_FUNC_ENTER__;
 
-       if (data == NULL || part == NULL) {
+       if (data == NULL || part == NULL)
                return NULL;
-       }
+
        WFD_APP_LOG(WFD_APP_LOG_LOW, "Part %s", part);
 
        if (!strcmp("elm.text", part)) {
@@ -968,9 +962,9 @@ static Evas_Object *__wfd_password_check(void *data, Evas_Object *obj,
                const char *part)
 {
        __WFD_APP_FUNC_ENTER__;
-       if (obj == NULL || part == NULL) {
+       if (obj == NULL || part == NULL)
                return NULL;
-       }
+
        wfd_appdata_t *ad = wfd_get_appdata();
        WFD_RETV_IF(ad == NULL, NULL, "Incorrect parameter(NULL)\n");
        Evas_Object *check = NULL;
@@ -1033,7 +1027,7 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
 
        /* Entry genlist item */
        ad->pin_desc_itc = elm_genlist_item_class_new();
-       if(ad->pin_desc_itc != NULL) {
+       if (ad->pin_desc_itc != NULL) {
                ad->pin_desc_itc->item_style = WFD_GENLIST_MULTILINE_TEXT_STYLE;
                ad->pin_desc_itc->func.text_get = __wfd_main_desc_label_get;
                ad->pin_desc_itc->func.content_get = NULL;
@@ -1042,7 +1036,7 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
 
                git = elm_genlist_item_append(genlist, ad->pin_desc_itc, ad, NULL,
                                ELM_GENLIST_ITEM_NONE, NULL, NULL);
-               if(git != NULL)
+               if (git != NULL)
                        elm_genlist_item_select_mode_set(git,
                                                 ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
@@ -1052,7 +1046,7 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
        }
 
        ad->pin_entry_itc = elm_genlist_item_class_new();
-       if(ad->pin_entry_itc != NULL) {
+       if (ad->pin_entry_itc != NULL) {
                ad->pin_entry_itc->item_style = "entry";
                ad->pin_entry_itc->func.text_get = NULL;
                ad->pin_entry_itc->func.content_get = __wfd_pin_entry_icon_get;
@@ -1064,7 +1058,7 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
        }
 
        ad->paswd_itc = elm_genlist_item_class_new();
-       if(ad->paswd_itc != NULL) {
+       if (ad->paswd_itc != NULL) {
                ad->paswd_itc->item_style = WFD_GENLIST_1LINE_TEXT_ICON_STYLE;
                ad->paswd_itc->func.text_get = __wfd_password_label;
                ad->paswd_itc->func.content_get = __wfd_password_check;
@@ -1072,7 +1066,7 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
                ad->paswd_itc->func.del = NULL;
 
                elm_genlist_item_append(genlist, ad->paswd_itc, pinpopup,
-                               NULL, ELM_GENLIST_ITEM_NONE, _gl_pswd_check_box_sel, (void *)ad );
+                               NULL, ELM_GENLIST_ITEM_NONE, _gl_pswd_check_box_sel, (void *)ad);
        }
 
        btn1 = elm_button_add(pinpopup);
@@ -1115,7 +1109,7 @@ void _replace_int(char *haystack, int size, char *niddle, int value)
 
        buf = g_strdup(haystack);
        p = strstr(buf, niddle);
-       if (p==NULL) {
+       if (p == NULL) {
                free(buf);
                return;
        }
@@ -1178,7 +1172,7 @@ void wfd_prepare_popup(int type, void *user_data)
                pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
 
                ad->popup = wfd_draw_pop_type_display(ad->win, pop);
-               break;
+               break;
 
        case /* MT */ WFD_POP_APRV_CONNECTION_WPS_DISPLAY_REQ:
                format_str = D_("IDS_WIFI_BODY_PS_IS_REQUESTING_A_WI_FI_DIRECT_CONNECTION_ALLOW_Q");
@@ -1190,7 +1184,7 @@ void wfd_prepare_popup(int type, void *user_data)
                pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
 
                ad->popup = wfd_draw_pop_type_c(ad->win, pop);
-               break;
+               break;
 
        case /* MT */ WFD_POP_APRV_CONNECTION_WPS_KEYPAD_REQ:
                _replace_1PS_2PD((char *)pop->text, sizeof(pop->text),
@@ -1203,7 +1197,7 @@ void wfd_prepare_popup(int type, void *user_data)
                pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
 
                ad->popup = wfd_draw_pop_type_display(ad->win, pop);
-               break;
+               break;
 
        case /* MT */ WFD_POP_PROG_CONNECT:
                snprintf(pop->text, sizeof(pop->text), "%s", D_("IDS_WIFI_BODY_CONNECTING_ING"));
@@ -1212,7 +1206,7 @@ void wfd_prepare_popup(int type, void *user_data)
                pop->resp_data1 = WFD_POP_RESP_APRV_CONNECT_NO;
 
                ad->popup = wfd_draw_pop_type_b(ad->win, pop);
-               break;
+               break;
 
        case /* MO */ WFD_POP_PROG_CONNECT_WITH_KEYPAD:
                _replace_1PS_2PD((char *)text, sizeof(text),
@@ -1231,7 +1225,7 @@ void wfd_prepare_popup(int type, void *user_data)
                pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
 
                ad->popup = wfd_draw_pop_type_keypad(ad->win, pop);
-               break;
+               break;
 
        case /* MO/MT */ WFD_POP_PROG_CONNECT_WITH_PIN:
                _replace_1PS_2PD((char *)text, sizeof(text),
@@ -1249,13 +1243,13 @@ void wfd_prepare_popup(int type, void *user_data)
                pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
 
                ad->popup = wfd_draw_pop_type_display(ad->win, pop);
-               break;
+               break;
 
        case WFD_POP_PROG_CONNECT_CANCEL:
                snprintf(pop->text, sizeof(pop->text), "%s", D_("IDS_BR_SK_CANCEL"));
                pop->timeout = WFD_POP_TIMER_120;
                ad->popup = wfd_draw_pop_type_a(ad->win, pop);
-               break;
+               break;
 
        default:
                break;
@@ -1264,9 +1258,9 @@ void wfd_prepare_popup(int type, void *user_data)
        /* feedback play */
        int ret = -1;
        ret = feedback_play(FEEDBACK_PATTERN_GENERAL);
-       if (ret != FEEDBACK_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR,"feedback_play error : %d\n", ret);
-       }
+       if (ret != FEEDBACK_ERROR_NONE)
+               WFD_APP_LOG(WFD_APP_LOG_ERROR, "feedback_play error : %d\n", ret);
+
        WFD_IF_FREE_MEM(peer_name);
        __WFD_APP_FUNC_EXIT__;
        return;
index 10b67c1..96ffea1 100644 (file)
@@ -91,7 +91,7 @@ static void __launch_app_result_cb(app_control_h request, app_control_h reply, a
 {
        __WFD_APP_FUNC_ENTER__;
 
-       if(result == APP_CONTROL_RESULT_FAILED) {
+       if (result == APP_CONTROL_RESULT_FAILED) {
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "User cancel to reconnect screen mirroring\n");
 #ifdef WFD_SCREEN_MIRRORING_ENABLED
                ad->screen_mirroring_state = WFD_POP_SCREEN_MIRROR_NONE;
@@ -116,10 +116,9 @@ static void _move_data_to_app_control(const char *key, const int type,
 
        app_control_h control = data;
 
-       if (type == BUNDLE_TYPE_STR)
-       {
+       if (type == BUNDLE_TYPE_STR) {
                bundle_keyval_get_basic_val((bundle_keyval_t *) kv, &ptr, &size);
-               buff = malloc(sizeof(char)* size + 1);
+               buff = malloc(sizeof(char) * size + 1);
                snprintf(buff, size + 1, "%s", ((char*) ptr));
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Found STR -KEY: %s, VAL: %s, SIZE: %d", key, buff, size);
 
@@ -127,7 +126,7 @@ static void _move_data_to_app_control(const char *key, const int type,
                free(buff);
        } else if (type == BUNDLE_TYPE_BYTE) {
                bundle_keyval_get_basic_val((bundle_keyval_t *) kv, &ptr, &size);
-               buff = malloc(sizeof(char)* size + 1);
+               buff = malloc(sizeof(char) * size + 1);
                snprintf(buff, size + 1, "%s", ((char*) ptr));
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Found STR -KEY: %s, VAL: %s, SIZE: %d", key, buff, size);
 
@@ -171,11 +170,10 @@ static void _launch_app(char *app_id, void *data)
 
        char *launch_type = NULL;
        bundle_get_str(data, "-t", &launch_type);
-       if (!strcmp(launch_type, "reconnect_by_connecting_wifi_ap")) {
+       if (!strcmp(launch_type, "reconnect_by_connecting_wifi_ap"))
                ret = app_control_send_launch_request(control, __launch_app_result_cb, NULL);
-       } else {
+       else
                ret = app_control_send_launch_request(control, NULL, NULL);
-       }
 
        if (ret != APP_CONTROL_ERROR_NONE) {
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "app_control_send_launch_request() is failed : %d", ret);
@@ -202,7 +200,7 @@ void _add_screen_mirroring_activated_indicator(void *user_data)
                ad->noti_screen_mirroring_play = NULL;
        }
 
-       if(ad->noti_screen_mirroring_on != NULL) {
+       if (ad->noti_screen_mirroring_on != NULL) {
                noti_err = notification_free(ad->noti_screen_mirroring_on);
                WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_free. [%d]", noti_err);
        }
@@ -251,7 +249,7 @@ void _add_wfd_peers_connected_notification(void *user_data, char* package_name)
                ad->noti_screen_mirroring_on = NULL;
        }
 
-       if(ad->noti_screen_mirroring_play != NULL) {
+       if (ad->noti_screen_mirroring_play != NULL) {
                noti_err = notification_free(ad->noti_screen_mirroring_play);
                WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_free. [%d]", noti_err);
        }
@@ -366,16 +364,14 @@ static void _wfd_flight_mode_changed(keynode_t *node, void *user_data)
 #ifdef WFD_SCREEN_MIRRORING_ENABLED
        /* checking Screen Mirroring */
        if (vconf_get_int(VCONFKEY_SCREEN_MIRRORING_STATE, &screen_mirroring_status) < 0)
-       {
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
-       }
+
        WFD_APP_LOG(WFD_APP_LOG_LOW, "screen_mirroring_status: %d\n", screen_mirroring_status);
 
-       if(screen_mirroring_status > VCONFKEY_SCREEN_MIRRORING_DEACTIVATED) {
+       if (screen_mirroring_status > VCONFKEY_SCREEN_MIRRORING_DEACTIVATED) {
                res = vconf_set_int(VCONFKEY_SCREEN_MIRRORING_STATE, VCONFKEY_SCREEN_MIRRORING_DEACTIVATED);
-               if (res < 0) {
+               if (res < 0)
                        WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to set vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
-               }
        }
 #endif
 
@@ -401,13 +397,12 @@ static void _wfd_cpu_limit_mode_changed(keynode_t *node, void *user_data)
                return;
        }
 
-       if(vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &cup_limit_mode) < 0) {
+       if (vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &cup_limit_mode) < 0) {
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU\n");
                return;
        }
 
-       if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &power_mode) < 0)
-       {
+       if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &power_mode) < 0) {
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SETAPPL_PSMODE\n");
                return;
        }
@@ -444,8 +439,7 @@ static void _wfd_power_saving_mode_changed(keynode_t *node, void *user_data)
                return;
        }
 
-       if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &power_mode) < 0)
-       {
+       if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &power_mode) < 0) {
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SETAPPL_PSMODE\n");
                return;
        }
@@ -461,7 +455,7 @@ static void _wfd_power_saving_mode_changed(keynode_t *node, void *user_data)
                bundle_free(b);
        } else if (power_mode == SETTING_PSMODE_POWERFUL ||
                        power_mode == SETTING_PSMODE_ADVISOR){
-                       if(vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &cup_limit_mode) < 0) {
+                       if (vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &cup_limit_mode) < 0) {
                                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU\n");
                                return;
                        }
@@ -499,8 +493,7 @@ static void _wfd_wifi_status_changed(keynode_t *node, void *user_data)
        }
 #endif
 
-       if (vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_status) < 0)
-       {
+       if (vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_status) < 0) {
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_WIFI_STATE\n");
                return;
        }
@@ -552,9 +545,7 @@ static void _wfd_allshare_cast_status_changed(keynode_t *node, void *user_data)
        WFD_RET_IF(NULL == ad, "NULL parameters.\n");
 
        if (vconf_get_int(VCONFKEY_SCREEN_MIRRORING_STATE, &screen_mirroring_status) < 0)
-       {
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
-       }
 
        WFD_APP_LOG(WFD_APP_LOG_ERROR, "VCONFKEY_SCREEN_MIRRORING_STATE:%d\n", screen_mirroring_status);
 
@@ -608,9 +599,8 @@ static Eina_Bool _wfd_hard_key_down_cb(void *data, int type, void *event)
 
                if (strnlen(ad->mac_addr_connecting, MACSTR_LENGTH) > 0) {
                        res = wifi_direct_reject_connection(ad->mac_addr_connecting);
-                       if (res != WIFI_DIRECT_ERROR_NONE) {
+                       if (res != WIFI_DIRECT_ERROR_NONE)
                                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to reject connection(%d)", res);
-                       }
                }
                memset(ad->mac_addr_connecting, 0x00, MACSTR_LENGTH);
                wfd_destroy_popup();
@@ -716,35 +706,30 @@ int wfd_app_util_deregister_vconf_callbacks(void *data)
 
        /* remove callback for flight mode */
        ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, _wfd_flight_mode_changed);
-       if (ret == -1) {
+       if (ret == -1)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for flight mode\n");
-       }
 
 #ifdef WFD_SCREEN_MIRRORING_ENABLED
        /* remove callback for allshare cast */
        ret = vconf_ignore_key_changed(VCONFKEY_SCREEN_MIRRORING_STATE, _wfd_allshare_cast_status_changed);
-       if (ret == -1) {
+       if (ret == -1)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for allshare cast\n");
-       }
 #endif
 
        /* remove callback for wifi */
        ret = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE, _wfd_wifi_status_changed);
-       if (ret == -1) {
+       if (ret == -1)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for wifi\n");
-       }
 
        /* remove callback for power mode */
        ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_PSMODE, _wfd_power_saving_mode_changed);
-       if (ret == -1) {
+       if (ret == -1)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for power mode\n");
-       }
 
        /* remove callback for cpu limit mode */
        ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, _wfd_cpu_limit_mode_changed);
-       if (ret == -1) {
+       if (ret == -1)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for cpu limit mode\n");
-       }
 
        return 0;
 }
@@ -771,17 +756,15 @@ void wfd_app_util_del_notification(wfd_appdata_t *ad)
        if (ad->noti_screen_mirroring_on) {
                noti_err = notification_free(ad->noti_screen_mirroring_on);
                ad->noti_screen_mirroring_on = NULL;
-               if (noti_err != NOTIFICATION_ERROR_NONE) {
+               if (noti_err != NOTIFICATION_ERROR_NONE)
                        WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
-               }
        }
 
        if (ad->noti_screen_mirroring_play) {
                noti_err = notification_free(ad->noti_screen_mirroring_play);
                ad->noti_screen_mirroring_play = NULL;
-               if (noti_err != NOTIFICATION_ERROR_NONE) {
+               if (noti_err != NOTIFICATION_ERROR_NONE)
                        WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
-               }
        }
 #endif
 
@@ -789,18 +772,16 @@ void wfd_app_util_del_notification(wfd_appdata_t *ad)
        if (ad->noti_wifi_direct_on) {
                noti_err = notification_free(ad->noti_wifi_direct_on);
                ad->noti_wifi_direct_on = NULL;
-               if (noti_err != NOTIFICATION_ERROR_NONE) {
+               if (noti_err != NOTIFICATION_ERROR_NONE)
                        WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
-               }
        }
 #endif
 
        if (ad->noti_wifi_direct_connected) {
                noti_err = notification_free(ad->noti_wifi_direct_connected);
                ad->noti_wifi_direct_connected = NULL;
-               if (noti_err != NOTIFICATION_ERROR_NONE) {
+               if (noti_err != NOTIFICATION_ERROR_NONE)
                        WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
-               }
        }
 
        __WFD_APP_FUNC_EXIT__;
@@ -820,7 +801,7 @@ void wfd_app_util_add_indicator_icon(void *user_data)
        notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
        WFD_RET_IF(ad->noti_wifi_direct_on, "Indicator already exists");
 
-       if(ad->noti_wifi_direct_on != NULL) {
+       if (ad->noti_wifi_direct_on != NULL) {
                noti_err = notification_free(ad->noti_wifi_direct_on);
                WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_free. [%d]", noti_err);
        }
@@ -864,18 +845,17 @@ void wfd_app_util_set_screen_mirroring_deactivated(wfd_appdata_t *ad)
                return;
        }
 
-       if (vconf_get_int(VCONFKEY_SCREEN_MIRRORING_STATE, &screen_mirroring_status) < 0) {
+       if (vconf_get_int(VCONFKEY_SCREEN_MIRRORING_STATE, &screen_mirroring_status) < 0)
                WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
-       }
 
        WFD_APP_LOG(WFD_APP_LOG_LOW, "screen_mirroring_status: %d\n", screen_mirroring_status);
        /* Set the vconf value to DEACTIVATED only when the previous vconf value is CONNECTED.
        If the previous vconf value is ACTIVATED, it means that the Screen Mirroring UG changed that key already. So no need to change it. */
-       if(screen_mirroring_status == VCONFKEY_SCREEN_MIRRORING_CONNECTED) {
+       if (screen_mirroring_status == VCONFKEY_SCREEN_MIRRORING_CONNECTED) {
                result = vconf_set_int(VCONFKEY_SCREEN_MIRRORING_STATE, VCONFKEY_SCREEN_MIRRORING_DEACTIVATED);
-               if (result < 0) {
+               if (result < 0)
                        WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to set vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
-               }
+
                notification_status_message_post(D_("IDS_SMR_POP_SCREEN_MIRRORING_HAS_BEEN_DISABLED"));
        }
 
@@ -900,7 +880,7 @@ void wfd_app_util_add_wfd_turn_off_notification(void *user_data)
        /* delete all notifications */
        wfd_app_util_del_notification(ad);
 
-       if(ad->noti_wifi_direct_connected!= NULL) {
+       if (ad->noti_wifi_direct_connected != NULL) {
                noti_err = notification_free(ad->noti_wifi_direct_connected);
                WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_free. [%d]", noti_err);
        }
@@ -974,9 +954,8 @@ void wfd_app_util_del_wfd_connected_notification(wfd_appdata_t *ad)
        if (ad->noti_wifi_direct_connected) {
                noti_err = notification_free(ad->noti_wifi_direct_connected);
                ad->noti_wifi_direct_connected = NULL;
-               if (noti_err != NOTIFICATION_ERROR_NONE) {
+               if (noti_err != NOTIFICATION_ERROR_NONE)
                        WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
-               }
        }
 
        __WFD_APP_FUNC_EXIT__;
index f3f5bd3..b954b82 100644 (file)
@@ -31,7 +31,7 @@ extern "C"
 typedef enum {
        MOTION_TARGET_VIEW_FOCUS_ON = 0,
        MOTION_TARGET_VIEW_FOCUS_OFF
-}TARGET_VIEW_FOCUS;
+} TARGET_VIEW_FOCUS;
 
 void motion_create(struct ug_data *);
 void motion_destroy(void);
index 274e1d9..c49852e 100644 (file)
@@ -72,7 +72,7 @@
 
 #define WFD_IF_DEL_OBJ(obj) \
                do { \
-                       if(obj) { \
+                       if (obj) { \
                                evas_object_del(obj); \
                                obj = NULL; \
                        } \
@@ -80,7 +80,7 @@
 
 #define WFD_IF_DEL_ITEM(obj) \
                do { \
-                       if(obj) { \
+                       if (obj) { \
                                elm_object_item_del(obj); \
                                obj = NULL; \
                        } \
 
 #define WFD_RET_IF(expr, fmt, args...) \
                do { \
-                       if(expr) { \
-                               DBG(LOG_ERROR, "[%s] Return, message "fmt, #expr, ##args );\
+                       if (expr) { \
+                               DBG(LOG_ERROR, "[%s] Return, message "fmt, #expr, ##args);\
                                return; \
                        } \
                } while (0)
 
 #define WFD_RETV_IF(expr, val, fmt, args...) \
                do { \
-                       if(expr) { \
-                               DBG(LOG_ERROR,"[%s] Return value, message "fmt, #expr, ##args );\
+                       if (expr) { \
+                               DBG(LOG_ERROR, "[%s] Return value, message "fmt, #expr, ##args);\
                                return (val); \
                        } \
                } while (0)
 
 #define WFD_IF_FREE_MEM(mem) \
                do { \
-                       if(mem) { \
+                       if (mem) { \
                                free(mem); \
                                mem = NULL; \
                        } \
@@ -160,7 +160,7 @@ typedef enum {
 } discovery_status_e;
 
 
-typedef struct device_type_s_{
+typedef struct device_type_s_ {
        char ssid[SSID_LENGTH + 1];
        unsigned int category;
        unsigned int sub_category;
index c073d08..4d0052b 100644 (file)
@@ -64,9 +64,8 @@ static void _wifi_state_cb(keynode_t *key, void *data)
        }
 
        res = net_deregister_client();
-       if (res != NET_ERR_NONE) {
+       if (res != NET_ERR_NONE)
                DBG(LOG_ERROR, "Failed to deregister network client. [%d]\n", res);
-       }
 
        __FUNC_EXIT__;
 }
@@ -142,9 +141,8 @@ static void __enabled_cb(tethering_error_e error, tethering_type_e type, bool is
        bool is_wifi_enabled = false;
 
        if (error != TETHERING_ERROR_NONE) {
-               if (is_requested != TRUE) {
+               if (is_requested != TRUE)
                        return;
-               }
 
                DBG(LOG_ERROR, "error !!! TETHERING is not enabled.\n");
                return;
@@ -153,21 +151,18 @@ static void __enabled_cb(tethering_error_e error, tethering_type_e type, bool is
        th = ugd->hotspot_handle;
        if (th != NULL) {
                is_wifi_enabled = tethering_is_enabled(th, TETHERING_TYPE_WIFI);
-               if (is_wifi_enabled) {
+               if (is_wifi_enabled)
                        DBG(LOG_INFO, "Mobile hotspot is activated\n");
-               }
 
                /* Deregister cbs */
                ret = tethering_unset_enabled_cb(th, TETHERING_TYPE_WIFI);
-               if (ret != TETHERING_ERROR_NONE) {
+               if (ret != TETHERING_ERROR_NONE)
                        DBG(LOG_ERROR, "tethering_unset_enabled_cb is failed(%d)\n", ret);
-               }
 
                /* Destroy tethering handle */
                ret = tethering_destroy(th);
-               if (ret != TETHERING_ERROR_NONE) {
+               if (ret != TETHERING_ERROR_NONE)
                        DBG(LOG_ERROR, "tethering_destroy is failed(%d)\n", ret);
-               }
 
                ugd->hotspot_handle = NULL;
        }
@@ -196,9 +191,8 @@ static void __disabled_cb(tethering_error_e error, tethering_type_e type, tether
        bool is_wifi_enabled = false;
 
        if (error != TETHERING_ERROR_NONE) {
-               if (code != TETHERING_DISABLED_BY_REQUEST) {
+               if (code != TETHERING_DISABLED_BY_REQUEST)
                        return;
-               }
 
                DBG(LOG_ERROR, "error !!! TETHERING is not disabled.\n");
                return;
@@ -216,15 +210,13 @@ static void __disabled_cb(tethering_error_e error, tethering_type_e type, tether
                wfd_client_swtch_force(ugd, TRUE);
 
                ret = tethering_unset_disabled_cb(th, TETHERING_TYPE_WIFI);
-               if (ret != TETHERING_ERROR_NONE) {
+               if (ret != TETHERING_ERROR_NONE)
                        DBG(LOG_ERROR, "tethering_unset_disabled_cb is failed(%d)\n", ret);
-               }
 
                /* Destroy tethering handle */
                ret = tethering_destroy(th);
-               if (ret != TETHERING_ERROR_NONE) {
+               if (ret != TETHERING_ERROR_NONE)
                        DBG(LOG_ERROR, "tethering_destroy is failed(%d)\n", ret);
-               }
 
                ugd->hotspot_handle = NULL;
        }
@@ -345,15 +337,13 @@ static device_type_s *wfd_client_find_peer_by_mac(void *data, const char *mac_ad
 
        if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_IN_PROGRESS) {
                for (i = 0; i < ugd->raw_multi_selected_peer_cnt; i++) {
-                       if (!strncmp(mac_addr, (const char *)ugd->raw_multi_selected_peers[i].mac_addr, MAC_LENGTH)) {
+                       if (!strncmp(mac_addr, (const char *)ugd->raw_multi_selected_peers[i].mac_addr, MAC_LENGTH))
                                return &ugd->raw_multi_selected_peers[i];
-                       }
                }
        } else {
                for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
-                       if (!strncmp(mac_addr, ((device_type_s *)iterator->data)->mac_addr, MAC_LENGTH)) {
+                       if (!strncmp(mac_addr, ((device_type_s *)iterator->data)->mac_addr, MAC_LENGTH))
                                return (device_type_s *)iterator->data;
-                       }
                }
        }
 
@@ -374,9 +364,8 @@ static device_type_s *wfd_client_find_peer_by_mac(void *data, const char *mac_ad
 
        /* Get the device from peer list */
        for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
-               if (!strncmp(mac_addr, ((device_type_s *)iterator->data)->mac_addr, MAC_LENGTH)) {
+               if (!strncmp(mac_addr, ((device_type_s *)iterator->data)->mac_addr, MAC_LENGTH))
                        return (device_type_s *)iterator->data;
-               }
        }
 
        __FUNC_EXIT__;
@@ -400,16 +389,15 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
        switch (device_state) {
        case WIFI_DIRECT_DEVICE_STATE_ACTIVATED:
                DBG(LOG_INFO, "WIFI_DIRECT_DEVICE_STATE_ACTIVATED\n");
-               if(ugd->scan_toolbar == NULL) {
+               if (ugd->scan_toolbar == NULL)
                        scan_button_create(ugd);
-               }
+
                if (error_code != WIFI_DIRECT_ERROR_NONE) {
                        DBG(LOG_ERROR, "Error in Activation/Deactivation [%d]\n", error_code);
-                       if (WIFI_DIRECT_ERROR_AUTH_FAILED == error_code) {
+                       if (WIFI_DIRECT_ERROR_AUTH_FAILED == error_code)
                                wfd_ug_warn_popup(ugd, D_("IDS_COM_POP_SECURITY_POLICY_RESTRICTS_USE_OF_WI_FI"), POPUP_TYPE_ACTIVATE_FAIL_POLICY_RESTRICTS);
-                       } else {
+                       else
                                wfd_ug_warn_popup(ugd, D_("IDS_COM_POP_FAILED"), POPUP_TYPE_ACTIVATE_FAIL);
-                       }
 
 #ifdef WFD_ON_OFF_GENLIST
                        ugd->wfd_onoff = 0;
@@ -432,9 +420,8 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
 
 #ifndef MODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE
                res = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE, _wifi_state_cb);
-               if (res == -1) {
+               if (res == -1)
                        DBG(LOG_ERROR, "Failed to ignore vconf key callback for wifi state\n");
-               }
 #endif /* MODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE */
 
                ugd->wfd_discovery_status = WIFI_DIRECT_DISCOVERY_SOCIAL_CHANNEL_START;
@@ -460,9 +447,8 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
 
                WFD_IF_DEL_ITEM(ugd->multi_connect_toolbar_item);
 
-               if (ugd->ctxpopup) {
+               if (ugd->ctxpopup)
                        ctxpopup_dismissed_cb(ugd, NULL, NULL);
-               }
 
                /*
                 * When multi-connect is on ongoing and deactivte happened destroy
@@ -498,7 +484,7 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
 
                /* Delete warn popups for Airplane mode */
                if (NULL != ugd->warn_popup) {
-                       evas_object_del( ugd->warn_popup);
+                       evas_object_del(ugd->warn_popup);
                        ugd->warn_popup = NULL;
                }
 
@@ -511,9 +497,8 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
                *  discovered peers and connected peers
                */
                wfd_client_free_raw_discovered_peers(ugd);
-               if (ugd->raw_connected_peer_cnt > 0) {
+               if (ugd->raw_connected_peer_cnt > 0)
                        memset(ugd->raw_connected_peers, 0x00, ugd->raw_connected_peer_cnt*sizeof(device_type_s));
-               }
 
                ugd->raw_discovered_peer_cnt = 0;
                ugd->raw_connected_peer_cnt = 0;
@@ -521,17 +506,15 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
                wfd_free_nodivice_item(ugd);
                wfd_ug_view_init_genlist(ugd, true);
 
-               if (ugd->multi_navi_item != NULL) {
+               if (ugd->multi_navi_item != NULL)
                        elm_naviframe_item_pop(ugd->naviframe);
-               }
 
                if (TRUE == ugd->is_hotspot_off && TRUE == ugd->is_hotspot_locally_disabled) {
-                       if (0 == wfd_mobile_ap_on(ugd)) {
+                       if (0 == wfd_mobile_ap_on(ugd))
                                ugd->is_hotspot_locally_disabled = FALSE;
-                       }
                }
 
-               if(ugd->scan_toolbar) {
+               if (ugd->scan_toolbar) {
                        evas_object_del(ugd->scan_toolbar);
                        ugd->scan_toolbar = NULL;
                }
@@ -540,17 +523,15 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
                break;
        }
 
-       /*if (ugd->scan_toolbar) {
+       /*if (ugd->scan_toolbar)
                wfd_ug_view_refresh_button(ugd->scan_toolbar, D_("IDS_WIFI_SK4_SCAN"), TRUE);
-       }*/
+       */
 
-       if (ugd->multiconn_scan_stop_btn) {
+       if (ugd->multiconn_scan_stop_btn)
                wfd_ug_view_refresh_button(ugd->multiconn_scan_stop_btn, "IDS_WIFI_SK4_SCAN", TRUE);
-       }
 
-       if (ugd->back_btn) {
+       if (ugd->back_btn)
                elm_object_disabled_set(ugd->back_btn, FALSE);
-       }
 
        __FUNC_EXIT__;
        return;
@@ -589,11 +570,10 @@ bool _wfd_discoverd_peer_cb(wifi_direct_discovered_peer_info_s *peer, void *user
                peer_tmp->is_connected = peer->is_connected;
                peer_tmp->dev_sel_state = FALSE;
 
-               if (TRUE == peer->is_connected) {
+               if (TRUE == peer->is_connected)
                        peer_tmp->conn_status = PEER_CONN_STATUS_CONNECTED;
-               } else {
+               else
                        peer_tmp->conn_status = PEER_CONN_STATUS_DISCONNECTED;
-               }
 
                ugd->raw_discovered_peer_list = g_list_append(ugd->raw_discovered_peer_list, peer_tmp);
                DBG(LOG_INFO, "\tSSID: [%s]\n", peer_tmp->ssid);
@@ -609,11 +589,10 @@ bool _wfd_discoverd_peer_cb(wifi_direct_discovered_peer_info_s *peer, void *user
        WFD_IF_FREE_MEM(peer->mac_address);
        WFD_IF_FREE_MEM(peer->interface_address);
 
-       if (NULL != peer->service_list)
-       {
-               for (i=0; i<peer->service_count && peer->service_list[i] != NULL; i++) {
+       if (NULL != peer->service_list) {
+               for (i = 0; i < peer->service_count && peer->service_list[i] != NULL; i++)
                        free(peer->service_list[i]);
-               }
+
                WFD_IF_FREE_MEM(peer->service_list);
        }
 
@@ -648,9 +627,9 @@ bool _wfd_connected_peer_cb(wifi_direct_connected_peer_info_s *peer, void *user_
 
        char services[256] = {0,};
        DBG(LOG_INFO, "\tservice_count: [%d]\n", peer->service_count);
-       if (peer->service_count>0) {
+       if (peer->service_count > 0) {
                unsigned int len = 0;
-               for (i=0; i<peer->service_count && peer->service_list != NULL; i++) {
+               for (i = 0; i < peer->service_count && peer->service_list != NULL; i++) {
                        snprintf(services + len, 256-len, "%s ", peer->service_list[i]);
                        len = len + strlen(peer->service_list[i]) + 1;
                }
@@ -688,7 +667,7 @@ bool _wfd_connected_peer_cb(wifi_direct_connected_peer_info_s *peer, void *user_
                        return FALSE;
                }
 
-               if(peer->ip_address != NULL && strlen(services) != 0 ) {
+               if (peer->ip_address != NULL && strlen(services) != 0) {
                        app_control_add_extra_data(control, "ip_address", peer->ip_address);
                        app_control_add_extra_data(control, "wfds", services);
                        ug_send_result(ugd->ug, control);
@@ -700,11 +679,10 @@ bool _wfd_connected_peer_cb(wifi_direct_connected_peer_info_s *peer, void *user_
        WFD_IF_FREE_MEM(peer->mac_address);
        WFD_IF_FREE_MEM(peer->interface_address);
 
-       if (NULL != peer->service_list)
-       {
-               for (i=0; i<peer->service_count && peer->service_list[i] != NULL; i++) {
+       if (NULL != peer->service_list) {
+               for (i = 0; i < peer->service_count && peer->service_list[i] != NULL; i++)
                        free(peer->service_list[i]);
-               }
+
                WFD_IF_FREE_MEM(peer->service_list);
        }
 
@@ -762,9 +740,8 @@ int wfd_ug_get_connecting_peer(struct ug_data *ugd)
        ugd->mac_addr_connecting = mac_addr;
 
        for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
-               if (!strncmp(mac_addr, ((device_type_s *)iterator->data)->mac_addr, MAC_LENGTH)) {
+               if (!strncmp(mac_addr, ((device_type_s *)iterator->data)->mac_addr, MAC_LENGTH))
                        ((device_type_s *)iterator->data)->conn_status = PEER_CONN_STATUS_CONNECTING;
-               }
        }
 
 
@@ -845,9 +822,8 @@ gboolean wfd_delete_progressbar_cb(void *user_data)
        wfd_ug_view_refresh_glitem(ugd->mcview_title_item);
        wfd_ug_view_refresh_glitem(ugd->avlbl_wfd_item);
 
-       if (0 == ugd->gl_available_dev_cnt_at_multiconn_view) {
+       if (0 == ugd->gl_available_dev_cnt_at_multiconn_view)
                _create_no_device_multiconnect_genlist(ugd);
-       }
 
        wfd_refresh_wifi_direct_state(ugd);
        if (WIFI_DIRECT_STATE_CONNECTING != ugd->wfd_status &&
@@ -886,9 +862,8 @@ void discover_cb(int error_code, wifi_direct_discovery_state_e discovery_state,
                return;
        }
 
-       if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_IN_PROGRESS) {
+       if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_IN_PROGRESS)
                return;
-       }
 
        DBG(LOG_INFO, "Discovery event [%d], error_code [%d]\n", discovery_state, error_code);
 
@@ -903,9 +878,8 @@ void discover_cb(int error_code, wifi_direct_discovery_state_e discovery_state,
                        ugd->raw_discovered_peer_cnt = 0;
                        wfd_ug_view_init_genlist(ugd, false);
 
-                       if (ugd->avlbl_wfd_item == NULL) {
+                       if (ugd->avlbl_wfd_item == NULL)
                                _create_available_dev_genlist(ugd);
-                       }
 
                        wfd_ug_view_refresh_glitem(ugd->mcview_title_item);
                        /* clear not alive peers after 5 secs */
@@ -936,13 +910,12 @@ void discover_cb(int error_code, wifi_direct_discovery_state_e discovery_state,
        if (WIFI_DIRECT_DISCOVERY_STARTED == discovery_state &&
                ugd->wfd_discovery_status == WIFI_DIRECT_DISCOVERY_SOCIAL_CHANNEL_START) {
                WFD_IF_DEL_ITEM(ugd->multi_connect_toolbar_item);
-               if (!ugd->conn_wfd_item) {
+               if (!ugd->conn_wfd_item)
                        elm_layout_content_set(ugd->button_layout, "button.big", ugd->scan_toolbar);
-               }
+
                wfd_ug_view_refresh_button(ugd->scan_toolbar, "IDS_WIFI_SK_STOP", TRUE);
-               if (ugd->multiconn_scan_stop_btn) {
+               if (ugd->multiconn_scan_stop_btn)
                        wfd_ug_view_refresh_button(ugd->multiconn_scan_stop_btn, "IDS_WIFI_SK_STOP", TRUE);
-               }
        }
 
        __FUNC_EXIT__;
@@ -996,7 +969,7 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                        } else {
                                peer->conn_status = PEER_CONN_STATUS_FAILED_TO_CONNECT;
                                peer = find_peer_in_glist(ugd->gl_mul_conn_peers_start, peer->mac_addr);
-                               if ( peer != NULL) {
+                               if (peer != NULL) {
                                        peer->conn_status = PEER_CONN_STATUS_FAILED_TO_CONNECT;
                                        wfd_ug_view_refresh_glitem(peer->gl_item);
                                }
@@ -1009,7 +982,7 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                        peer->conn_status = PEER_CONN_STATUS_CONNECTING;
                        peer = find_peer_in_glist(ugd->gl_mul_conn_peers_start, peer->mac_addr);
 
-                       if ( peer != NULL) {
+                       if (peer != NULL) {
                                peer->conn_status = PEER_CONN_STATUS_CONNECTING;
                                wfd_ug_view_refresh_glitem(peer->gl_item);
                        }
@@ -1045,9 +1018,8 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                                wfd_ug_get_connected_peers(ugd);
 
                                /* when auto_exit and not multi-connect*/
-                               if ((ugd->is_auto_exit)&&(ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_NONE)) {
+                               if ((ugd->is_auto_exit) && (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_NONE))
                                        _wfd_ug_auto_exit(ugd);
-                               }
 
                                wfd_ug_update_connected_peers(ugd);
                        } else {
@@ -1064,9 +1036,8 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                        wfd_ug_view_refresh_button(ugd->scan_toolbar, "IDS_WIFI_SK4_SCAN", TRUE);
 
                        /* change the multi connection mode, it can be connected now */
-                       if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_COMPLETED) {
+                       if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_COMPLETED)
                                ugd->multi_connect_mode = WFD_MULTI_CONNECT_MODE_NONE;
-                       }
 
                        /* if other peer disconnected, get connected peers and update */
                        peer->conn_status = PEER_CONN_STATUS_DISCONNECTED;
@@ -1085,9 +1056,8 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                        evas_object_hide(content);
 
                        /* when disconnection, clear all the connected peers */
-                       if (ugd->raw_connected_peer_cnt > 0) {
+                       if (ugd->raw_connected_peer_cnt > 0)
                                memset(ugd->raw_connected_peers, 0x00, ugd->raw_connected_peer_cnt*sizeof(device_type_s));
-                       }
 
                        ugd->raw_connected_peer_cnt = 0;
                        wfd_ug_view_init_genlist(ugd, true);
@@ -1114,9 +1084,8 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                        wfd_cancel_progressbar_stop_timer(ugd);
                        wfd_delete_progressbar_cb(ugd);
 
-                       if (ugd->multi_navi_item) {
+                       if (ugd->multi_navi_item)
                                elm_naviframe_item_pop(ugd->naviframe);
-                       }
 
                        ugd->mac_addr_connecting = peer->mac_addr;
                        ugd->is_conn_incoming = FALSE;
@@ -1165,25 +1134,21 @@ refresh_button:
                res = wifi_direct_is_group_owner(&owner);
                if (res == WIFI_DIRECT_ERROR_NONE) {
                        if (!owner) {
-                               if (ugd->scan_toolbar) {
+                               if (ugd->scan_toolbar)
                                        evas_object_data_set(ugd->toolbar, "scan", "scan");
-                               }
 
-                               if (ugd->multiconn_scan_stop_btn) {
+                               if (ugd->multiconn_scan_stop_btn)
                                        wfd_ug_view_refresh_button(ugd->multiconn_scan_stop_btn, "IDS_WIFI_SK4_SCAN", FALSE);
-                               }
                        }
                } else {
                    DBG(LOG_ERROR, "Failed to get whether client is group owner. [%d]\n", res);
                }
        } else {
-               if (ugd->scan_toolbar) {
+               if (ugd->scan_toolbar)
                        evas_object_data_set(ugd->toolbar, "scan", "scan");
-               }
 
-               if (ugd->multiconn_scan_stop_btn) {
+               if (ugd->multiconn_scan_stop_btn)
                        wfd_ug_view_refresh_button(ugd->multiconn_scan_stop_btn, "IDS_WIFI_SK4_SCAN", TRUE);
-               }
        }
 
        __FUNC_EXIT__;
@@ -1210,7 +1175,7 @@ void _ip_assigned_cb(const char *mac_address, const char *ip_address, const char
        struct ug_data *ugd = (struct ug_data *)user_data;
 
        if (!ip_address || 0 == strncmp(ip_address, "0.0.0.0", 7)) {
-               DBG(LOG_ERROR,"ip address is invalid.\n");
+               DBG(LOG_ERROR, "ip address is invalid.\n");
                return;
        }
 
@@ -1231,9 +1196,8 @@ void _ip_assigned_cb(const char *mac_address, const char *ip_address, const char
        app_control_destroy(control);
 
        /* when auto_exit and not multi-connect*/
-       if ((ugd->is_auto_exit)&&(ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_NONE)) {
+       if ((ugd->is_auto_exit) && (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_NONE))
                _wfd_ug_auto_exit(ugd);
-       }
 
        __FUNC_EXIT__;
 }
@@ -1316,7 +1280,7 @@ void wfd_init_ug_by_status(void *user_data)
        struct ug_data *ugd = (struct ug_data *)user_data;
        int res = 0;
 
-       if(ugd == NULL) {
+       if (ugd == NULL) {
                DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
                return;
        }
@@ -1436,11 +1400,11 @@ void wfd_gdbus_callback(GObject *source_object, GAsyncResult *result, gpointer u
 
        g_object_unref(ugd->dbus_cancellable);
        ugd->dbus_cancellable = NULL;
-       ugd->conn = G_DBUS_CONNECTION (source_object);
+       ugd->conn = G_DBUS_CONNECTION(source_object);
        return_data = g_dbus_connection_call_finish(ugd->conn, result, &error);
 
        if (error != NULL) {
-               DBG(LOG_ERROR,"DBus action failed. Error Msg [%s]\n", error->message);
+               DBG(LOG_ERROR, "DBus action failed. Error Msg [%s]\n", error->message);
                g_clear_error(&error);
        } else {
                DBG(LOG_INFO, "error msg is NULL\n");
@@ -1482,14 +1446,14 @@ int launch_wifi_direct_manager(void *data)
        addr  = g_dbus_address_get_for_bus_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
        WFD_RETV_IF(addr == NULL, -1, "Fail to get dbus addr.\n");
 
-       ugd->conn = g_dbus_connection_new_for_address_sync(addr,G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
+       ugd->conn = g_dbus_connection_new_for_address_sync(addr, G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
                        G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION, NULL, NULL, NULL);
 
-       if(ugd->conn == NULL) {
-               DBG(LOG_ERROR,"g_dbus_conn is NULL\n");
+       if (ugd->conn == NULL) {
+               DBG(LOG_ERROR, "g_dbus_conn is NULL\n");
                return -1;
        } else {
-               g_dbus_connection_call(ugd->conn, "net.netconfig", "/net/netconfig/wifi","net.netconfig.wifi",
+               g_dbus_connection_call(ugd->conn, "net.netconfig", "/net/netconfig/wifi", "net.netconfig.wifi",
                "LaunchDirect", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, ugd->dbus_cancellable, wfd_gdbus_callback, data);
        }
 
@@ -1507,20 +1471,17 @@ void wfd_client_destroy_tethering(struct ug_data *ugd)
        if (ugd->hotspot_handle != NULL) {
                /* Deregister cbs */
                ret = tethering_unset_enabled_cb(ugd->hotspot_handle, TETHERING_TYPE_WIFI);
-               if (ret != TETHERING_ERROR_NONE) {
+               if (ret != TETHERING_ERROR_NONE)
                        DBG(LOG_ERROR, "tethering_unset_enabled_cb is failed(%d)\n", ret);
-               }
 
                ret = tethering_unset_disabled_cb(ugd->hotspot_handle, TETHERING_TYPE_WIFI);
-               if (ret != TETHERING_ERROR_NONE) {
+               if (ret != TETHERING_ERROR_NONE)
                        DBG(LOG_ERROR, "tethering_unset_disabled_cb is failed(%d)\n", ret);
-               }
 
                /* Destroy tethering handle */
                ret = tethering_destroy(ugd->hotspot_handle);
-               if (ret != TETHERING_ERROR_NONE) {
+               if (ret != TETHERING_ERROR_NONE)
                        DBG(LOG_ERROR, "tethering_destroy is failed(%d)\n", ret);
-               }
 
                ugd->hotspot_handle = NULL;
        }
@@ -1549,71 +1510,63 @@ int deinit_wfd_client(void *data)
        wfd_cancel_progressbar_stop_timer(ugd);
        wfd_cancel_not_alive_delete_timer(ugd);
 
-       if(ugd->timer_multi_reset > 0) {
+       if (ugd->timer_multi_reset > 0)
                g_source_remove(ugd->timer_multi_reset);
-       }
+
        ugd->timer_multi_reset = 0;
 
-       if (ugd->g_source_multi_connect_next > 0) {
+       if (ugd->g_source_multi_connect_next > 0)
                g_source_remove(ugd->g_source_multi_connect_next);
-       }
+
        ugd->g_source_multi_connect_next = 0;
 
        res = wifi_direct_unset_discovery_state_changed_cb();
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to unset discovery state changed cb. [%d]\n", res);
-       }
+       if (res != WIFI_DIRECT_ERROR_NONE)
+               DBG(LOG_ERROR, "Failed to unset discovery state changed cb. [%d]\n", res);
 
        wifi_direct_unset_device_state_changed_cb();
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to unset device state changed cb. [%d]\n", res);
-       }
+       if (res != WIFI_DIRECT_ERROR_NONE)
+               DBG(LOG_ERROR, "Failed to unset device state changed cb. [%d]\n", res);
 
        wifi_direct_unset_connection_state_changed_cb();
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to unset connection state changed cb. [%d]\n", res);
-       }
+       if (res != WIFI_DIRECT_ERROR_NONE)
+               DBG(LOG_ERROR, "Failed to unset connection state changed cb. [%d]\n", res);
 
        wifi_direct_unset_client_ip_address_assigned_cb();
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to unset client ip address assigned cb. [%d]\n", res);
-       }
+       if (res != WIFI_DIRECT_ERROR_NONE)
+               DBG(LOG_ERROR, "Failed to unset client ip address assigned cb. [%d]\n", res);
 
        if (ugd->wfd_status == WIFI_DIRECT_STATE_CONNECTING &&
                NULL != ugd->mac_addr_connecting) {
                if (ugd->is_conn_incoming) {
                        DBG(LOG_INFO, "Reject the incoming connection before client deregister \n");
                        res = wifi_direct_reject_connection(ugd->mac_addr_connecting);
-                       if (res != WIFI_DIRECT_ERROR_NONE) {
+                       if (res != WIFI_DIRECT_ERROR_NONE)
                                DBG(LOG_ERROR, "Failed to send reject request [%d]\n", res);
-                       }
                } else {
                        DBG(LOG_INFO, "Cancel the outgoing connection before client deregister \n");
                        res = wifi_direct_cancel_connection(ugd->mac_addr_connecting);
-                       if (res != WIFI_DIRECT_ERROR_NONE) {
+                       if (res != WIFI_DIRECT_ERROR_NONE)
                                DBG(LOG_ERROR, "Failed to send cancel request [%d]\n", res);
-                       }
                }
                ugd->mac_addr_connecting = NULL;
        }
 
 
        res = wifi_direct_deinitialize();
-       if (res != WIFI_DIRECT_ERROR_NONE) {
+       if (res != WIFI_DIRECT_ERROR_NONE)
                DBG(LOG_ERROR, "Failed to deregister client. [%d]\n", res);
-       }
 
        /* release vconf, hotspot..  */
 #ifndef MODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE
        res = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE, _wifi_state_cb);
-       if (res == -1) {
+       if (res == -1)
                DBG(LOG_ERROR, "Failed to ignore vconf key callback for wifi state\n");
-       }
 
        res = net_deregister_client();
-       if (res != NET_ERR_NONE) {
+       if (res != NET_ERR_NONE)
                DBG(LOG_ERROR, "Failed to deregister network client. [%d]\n", res);
-       }
+
 #endif /* MODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE */
 
 
@@ -1636,7 +1589,7 @@ int wfd_client_switch_on(void *data)
 
        bool is_wifi_enabled = false;
 
-       if(!ugd->is_init_ok) {
+       if (!ugd->is_init_ok) {
                DBG(LOG_ERROR, "device is initializing, please wait\n");
                return -1;
        }
@@ -1676,9 +1629,7 @@ int wfd_client_switch_on(void *data)
                if (is_wifi_enabled) {
                        DBG(LOG_INFO, "WiFi is connected, so have to turn off WiFi");
                        wfd_ug_act_popup(ugd, D_("IDS_WIFI_BODY_USING_WI_FI_DIRECT_WILL_DISCONNECT_CURRENT_WI_FI_TETHERING_CONTINUE_Q"), POPUP_TYPE_HOTSPOT_OFF);
-               } else
-
-               {
+               } else {
                        res = wifi_direct_activate();
                        if (res != WIFI_DIRECT_ERROR_NONE) {
                                DBG(LOG_ERROR, "Failed to activate Wi-Fi Direct. error code = [%d]\n", res);
@@ -1696,21 +1647,17 @@ int wfd_client_switch_on(void *data)
                        }
 #endif
                        /* while activating, disable the buttons */
-                       if (ugd->scan_toolbar == NULL) {
+                       if (ugd->scan_toolbar == NULL)
                                scan_button_create(ugd);
-                       }
 
-                       if (ugd->scan_toolbar) {
+                       if (ugd->scan_toolbar)
                                wfd_ug_view_refresh_button(ugd->scan_toolbar, "IDS_WIFI_SK4_SCAN", FALSE);
-                       }
 
-                       if (ugd->multiconn_scan_stop_btn) {
+                       if (ugd->multiconn_scan_stop_btn)
                                wfd_ug_view_refresh_button(ugd->multiconn_scan_stop_btn, "IDS_WIFI_SK4_SCAN", FALSE);
-                       }
 
-                       if (ugd->back_btn) {
+                       if (ugd->back_btn)
                                elm_object_disabled_set(ugd->back_btn, TRUE);
-                       }
                }
        } else {
                DBG(LOG_INFO, "Wi-Fi Direct is already activated\n");
@@ -1746,14 +1693,14 @@ int wfd_client_switch_off(void *data)
                wfd_cancel_progressbar_stop_timer(ugd);
                wfd_cancel_not_alive_delete_timer(ugd);
 
-               if(ugd->timer_multi_reset > 0) {
+               if (ugd->timer_multi_reset > 0)
                        g_source_remove(ugd->timer_multi_reset);
-               }
+
                ugd->timer_multi_reset = 0;
 
-               if (ugd->g_source_multi_connect_next > 0) {
+               if (ugd->g_source_multi_connect_next > 0)
                        g_source_remove(ugd->g_source_multi_connect_next);
-               }
+
                ugd->g_source_multi_connect_next = 0;
 
                /*if connected, disconnect all devices*/
@@ -1782,17 +1729,14 @@ int wfd_client_switch_off(void *data)
                        ugd->scan_toolbar = NULL;
                }
 
-               if (ugd->multiconn_scan_stop_btn) {
+               if (ugd->multiconn_scan_stop_btn)
                        wfd_ug_view_refresh_button(ugd->multiconn_scan_stop_btn, "IDS_WIFI_SK4_SCAN", FALSE);
-               }
 
-               if (ugd->multi_connect_toolbar_item) {
+               if (ugd->multi_connect_toolbar_item)
                        elm_object_item_disabled_set(ugd->multi_connect_toolbar_item, TRUE);
-               }
 
-               if (ugd->back_btn) {
+               if (ugd->back_btn)
                        elm_object_disabled_set(ugd->back_btn, TRUE);
-               }
        }
 
        __FUNC_EXIT__;
index ad8509c..f3ca73f 100755 (executable)
@@ -39,15 +39,13 @@ static TARGET_VIEW_FOCUS __motion_target_view_focus_get(void *data)
 {
        struct ug_data *ugd = (struct ug_data *)data;
 
-       if ((ugd == NULL) || (ugd->naviframe == NULL)) {
+       if ((ugd == NULL) || (ugd->naviframe == NULL))
                return MOTION_TARGET_VIEW_FOCUS_OFF;
-       }
 
-       if (elm_object_focus_get(ugd->naviframe)) {
+       if (elm_object_focus_get(ugd->naviframe))
                return MOTION_TARGET_VIEW_FOCUS_ON;
-       } else {
+       else
                return MOTION_TARGET_VIEW_FOCUS_OFF;
-       }
 }
 
 
@@ -58,25 +56,24 @@ static void __motion_shake_cb(unsigned int event_type, sensor_event_data_t *even
        gboolean motion_activated = FALSE;
        struct ug_data *ugd = (struct ug_data *) data;
        if (NULL == ugd) {
-               DBG(LOG_ERROR,"NULL pointer!");
+               DBG(LOG_ERROR, "NULL pointer!");
                return;
        }
        TARGET_VIEW_FOCUS focus_state = __motion_target_view_focus_get(ugd);
 
        DBG(LOG_DEBUG, "event type: %d, focus state: %d\n", event_type, focus_state);
 
-       if (focus_state != MOTION_TARGET_VIEW_FOCUS_ON) {
+       if (focus_state != MOTION_TARGET_VIEW_FOCUS_ON)
                return;
-       }
 
        if (vconf_get_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION,
                        (void *)&motion_activated)) {
-               DBG(LOG_ERROR,"Get motion activation status fail");
+               DBG(LOG_ERROR, "Get motion activation status fail");
                return;
        }
 
        if (FALSE == motion_activated) {
-               DBG(LOG_INFO,"Motion value is false");
+               DBG(LOG_INFO, "Motion value is false");
                return;
        }
 
@@ -87,7 +84,7 @@ static void __motion_shake_cb(unsigned int event_type, sensor_event_data_t *even
        }
 
        if (FALSE == motion_activated) {
-               DBG(LOG_INFO,"Shake status is false");
+               DBG(LOG_INFO, "Shake status is false");
                return;
        }
 
@@ -174,9 +171,8 @@ void motion_create(struct ug_data *ugd)
 
 fail:
        ret = sf_disconnect(motion_handle);
-       if (ret < 0) {
+       if (ret < 0)
                DBG(LOG_ERROR, "Failed Operation sf_disconnect. [%d]\n", ret);
-       }
 }
 
 void motion_destroy(void)
@@ -189,15 +185,14 @@ void motion_destroy(void)
        }
 
        ret = sf_stop(motion_handle);
-       if (ret < 0) {
+       if (ret < 0)
                DBG(LOG_ERROR, "Failed Operation sf_stop. [%d]\n", ret);
-       }
+
        ret = sf_unregister_event(motion_handle, MOTION_ENGINE_EVENT_SHAKE);
-       if (ret < 0) {
+       if (ret < 0)
                DBG(LOG_ERROR, "Failed Operation sf_unregister_event. [%d]\n", ret);
-       }
+
        ret = sf_disconnect(motion_handle);
-       if (ret < 0) {
+       if (ret < 0)
                DBG(LOG_ERROR, "Failed Operation sf_disconnect. [%d]\n", ret);
-       }
 }
index c97de17..0258c52 100644 (file)
@@ -57,11 +57,11 @@ static void __wfd_main_vconf_change_cb(keynode_t *key, void *data)
 
        char *vconf_name = vconf_keynode_get_name(key);
 
-       if (!g_strcmp0(vconf_name, VCONFKEY_SETAPPL_DEVICE_NAME_STR)){
+       if (!g_strcmp0(vconf_name, VCONFKEY_SETAPPL_DEVICE_NAME_STR)) {
                char *name_value = NULL;
                name_value = vconf_get_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR);
-               WFD_RET_IF (!name_value, "Get string is failed");
-               DBG(LOG_INFO,"name : %s", name_value);
+               WFD_RET_IF(!name_value, "Get string is failed");
+               DBG(LOG_INFO, "name : %s", name_value);
 
                if (ugd->device_name_item && g_strcmp0(ugd->dev_name, name_value))
                        wfd_ug_view_refresh_glitem(ugd->device_name_item);
@@ -95,9 +95,8 @@ static void _wifi_on_state_cb(keynode_t *key, void *data)
                }
                if (ugd->wfd_status <= WIFI_DIRECT_STATE_DEACTIVATING) {
                        DBG(LOG_INFO, "Activate WiFi Direct...");
-                       if (FALSE != wfd_client_switch_on(ugd)) {
+                       if (FALSE != wfd_client_switch_on(ugd))
                                DBG(LOG_ERROR, "Failed to Activate WiFi Direct");
-                       }
                }
        }
 }
@@ -123,9 +122,9 @@ static void __wfd_hotspot_mode_vconf_change_cb(keynode_t *key, void *data)
        DBG(LOG_INFO, "__wfd_hotspot_mode_vconf_change_cb mode %d", hotspot_mode);
 
        if (VCONFKEY_MOBILE_HOTSPOT_MODE_NONE == hotspot_mode) {
-               if (NULL != ugd->act_popup) {
+               if (NULL != ugd->act_popup)
                        evas_object_del(ugd->act_popup);
-               }
+
 #ifdef WFD_ON_OFF_GENLIST
                wfd_ug_refresh_on_off_check(ugd);
 #endif
@@ -289,9 +288,8 @@ static void _wfd_init_cb(void *data, Evas *evas, Evas_Object *obj, void *event_i
        evas_object_event_callback_del(ugd->base, EVAS_CALLBACK_SHOW, _wfd_init_cb);
 
        res = launch_wifi_direct_manager(ugd);
-       if (res != 0) {
+       if (res != 0)
                DBG(LOG_ERROR, "Failed to launch wifi direct manager\n");
-       }
 
        __FUNC_EXIT__;
        return;
@@ -305,9 +303,8 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
        int wfd_status = -1;
        int ret;
 
-       if (!ug || !priv) {
+       if (!ug || !priv)
                return NULL;
-       }
 
        ugd = priv;
        ugd->ug = ug;
@@ -315,9 +312,8 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
        bindtextdomain(PACKAGE, LOCALEDIR);
 
        ugd->win = ug_get_window();
-       if (!ugd->win) {
+       if (!ugd->win)
                return NULL;
-       }
 
        /* set rotation */
        if (elm_win_wm_rotation_supported_get(ugd->win)) {
@@ -353,7 +349,7 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                }
 
                ret = app_control_get_extra_data(control, "viewtype", &viewtype);
-               if(ret == APP_CONTROL_ERROR_NONE && viewtype) {
+               if (ret == APP_CONTROL_ERROR_NONE && viewtype) {
                        DBG(LOG_INFO, "viewtype: %s\n", viewtype);
                        ugd->view_type = strdup(viewtype);
                        WFD_IF_FREE_MEM(viewtype);
@@ -366,31 +362,31 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                ret = app_control_get_extra_data(control, "device_filter", &device_filter);
                if (ret == APP_CONTROL_ERROR_NONE && device_filter) {
                        DBG(LOG_INFO, "Device filter: %s", device_filter);
-                       if (0 == strncmp(device_filter, "computer", 8)) {
+                       if (0 == strncmp(device_filter, "computer", 8))
                                ugd->device_filter = WFD_DEVICE_TYPE_COMPUTER;
-                       } else if (0 == strncmp(device_filter, "input_device", 12)) {
+                       else if (0 == strncmp(device_filter, "input_device", 12))
                                ugd->device_filter = WFD_DEVICE_TYPE_INPUT_DEVICE;
-                       } else if (0 == strncmp(device_filter, "printer", 6)) {
+                       else if (0 == strncmp(device_filter, "printer", 6))
                                ugd->device_filter = WFD_DEVICE_TYPE_PRINTER;
-                       } else if (0 == strncmp(device_filter, "camera", 6)) {
+                       else if (0 == strncmp(device_filter, "camera", 6))
                                ugd->device_filter = WFD_DEVICE_TYPE_CAMERA;
-                       } else if (0 == strncmp(device_filter, "storage", 7)) {
+                       else if (0 == strncmp(device_filter, "storage", 7))
                                ugd->device_filter = WFD_DEVICE_TYPE_STORAGE;
-                       } else if (0 == strncmp(device_filter, "network_infra", 13)) {
+                       else if (0 == strncmp(device_filter, "network_infra", 13))
                                ugd->device_filter = WFD_DEVICE_TYPE_NW_INFRA;
-                       } else if (0 == strncmp(device_filter, "display", 7)) {
+                       else if (0 == strncmp(device_filter, "display", 7))
                                ugd->device_filter = WFD_DEVICE_TYPE_DISPLAYS;
-                       } else if (0 == strncmp(device_filter, "multimedia_device", 17)) {
+                       else if (0 == strncmp(device_filter, "multimedia_device", 17))
                                ugd->device_filter = WFD_DEVICE_TYPE_MM_DEVICES;
-                       } else if (0 == strncmp(device_filter, "game_device", 11)) {
+                       else if (0 == strncmp(device_filter, "game_device", 11))
                                ugd->device_filter = WFD_DEVICE_TYPE_GAME_DEVICES;
-                       } else if (0 == strncmp(device_filter, "telephone", 9)) {
+                       else if (0 == strncmp(device_filter, "telephone", 9))
                                ugd->device_filter = WFD_DEVICE_TYPE_TELEPHONE;
-                       } else if (0 == strncmp(device_filter, "audio", 5)) {
+                       else if (0 == strncmp(device_filter, "audio", 5))
                                ugd->device_filter = WFD_DEVICE_TYPE_AUDIO;
-                       } else {
+                       else
                                ugd->device_filter = WFD_DEVICE_TYPE_OTHER;
-                       }
+
                        WFD_IF_FREE_MEM(device_filter);
                }
 
@@ -401,11 +397,11 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                ret = app_control_get_extra_data(control, "auto_exit", &auto_exit);
                if (ret == APP_CONTROL_ERROR_NONE && auto_exit) {
                        DBG(LOG_INFO, "Auto exit: %s", auto_exit);
-                       if (0 == strncmp(auto_exit, "on", 2)) {
+                       if (0 == strncmp(auto_exit, "on", 2))
                                ugd->is_auto_exit = true;
-                       } else {
+                       else
                                ugd->is_auto_exit = false;
-                       }
+
                        WFD_IF_FREE_MEM(auto_exit);
                }
 
@@ -416,11 +412,11 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                ret = app_control_get_extra_data(control, "multi_connect", &multi_connect);
                if (ret == APP_CONTROL_ERROR_NONE && multi_connect) {
                        DBG(LOG_INFO, "Multi connection: %s", multi_connect);
-                       if (0 == strncmp(multi_connect, "off", 2)) {
+                       if (0 == strncmp(multi_connect, "off", 2))
                                ugd->is_multi_connect = false;
-                       } else {
+                       else
                                ugd->is_multi_connect = true;
-                       }
+
                        WFD_IF_FREE_MEM(multi_connect);
                }
 
@@ -437,11 +433,10 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                }
        }
 
-       if (mode == UG_MODE_FULLVIEW) {
+       if (mode == UG_MODE_FULLVIEW)
                ugd->base = _create_fullview(ugd->win, ugd);
-       } else {
+       else
                ugd->base = _create_frameview(ugd->win, ugd);
-       }
 
        if (ugd->base) {
                evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_DEL, wfd_ug_layout_del_cb, ugd);
@@ -454,9 +449,8 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
 
        /* check status of wifi-direct from vconf */
        wfd_status = wfd_get_vconf_status();
-       if (wfd_status < 0) {
+       if (wfd_status < 0)
                return NULL;
-       }
 
        /* draw UI */
        initialize_gen_item_class();
@@ -491,23 +485,19 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
        }
        ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_DEVICE_NAME_STR,
                        __wfd_main_vconf_change_cb, ugd);
-       if (ret) {
+       if (ret)
                DBG(LOG_ERROR, "Failed to set vconf notification callback(VCONFKEY_SETAPPL_DEVICE_NAME_STR)");
-       }
 
 #ifdef WIFI_STATE_CB
        ret = vconf_notify_key_changed(VCONFKEY_WIFI_STATE, _wifi_on_state_cb, ugd);
-       if (ret) {
+       if (ret)
                DBG(LOG_ERROR, "Failed to set vconf notification callback(VCONFKEY_WIFI_STATE)");
-
-       }
 #endif
 
        ret = vconf_notify_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE,
                __wfd_hotspot_mode_vconf_change_cb, ugd);
-       if (ret) {
+       if (ret)
                DBG(LOG_ERROR, "Failed to set vconf notification callback(MOBILE_HOTSPOT_MODE)");
-       }
 
        __FUNC_EXIT__;
        return ugd->base;
@@ -519,9 +509,8 @@ static void on_start(ui_gadget_h ug, app_control_h control, void *priv)
        struct ug_data *ugd;
        int res;
 
-       if (!ug || !priv) {
+       if (!ug || !priv)
                return;
-       }
 
        ugd = priv;
 
@@ -551,7 +540,7 @@ static void on_pause(ui_gadget_h ug, app_control_h control, void *priv)
        wfd_refresh_wifi_direct_state(ugd);
        DBG(LOG_INFO, "on pause, wfd status: %d\n", ugd->wfd_status);
 
-       if ((WIFI_DIRECT_STATE_DISCOVERING == ugd->wfd_status) &&
+       if ((WIFI_DIRECT_STATE_DISCOVERING == ugd->wfd_status) &&
                (WIFI_DIRECT_ERROR_NONE != wifi_direct_cancel_discovery())) {
                DBG(LOG_ERROR, "Failed to send cancel discovery state [%d]\n", ugd->wfd_status);
                __FUNC_EXIT__;
@@ -607,9 +596,8 @@ static void on_destroy(ui_gadget_h ug, app_control_h control, void *priv)
 
        /* DeInit WiFi Direct */
        ret = deinit_wfd_client(ugd);
-       if (ret) {
-               DBG(LOG_ERROR,"Failed to DeInit WiFi Direct");
-       }
+       if (ret)
+               DBG(LOG_ERROR, "Failed to DeInit WiFi Direct");
 
        if (ugd->scan_toolbar) {
                wfd_ug_view_refresh_button(ugd->scan_toolbar,
@@ -618,22 +606,19 @@ static void on_destroy(ui_gadget_h ug, app_control_h control, void *priv)
 
        ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_DEVICE_NAME_STR,
                        __wfd_main_vconf_change_cb);
-       if (ret == -1) {
-               DBG(LOG_ERROR,"Failed to ignore vconf key callback\n");
-       }
+       if (ret == -1)
+               DBG(LOG_ERROR, "Failed to ignore vconf key callback\n");
 
 #ifdef WIFI_STATE_CB
        ret = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE, _wifi_on_state_cb);
-       if (ret == -1) {
-               DBG(LOG_ERROR,"Failed to ignore vconf key callback\n");
-       }
+       if (ret == -1)
+               DBG(LOG_ERROR, "Failed to ignore vconf key callback\n");
 #endif
 
        ret = vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE,
                        __wfd_hotspot_mode_vconf_change_cb);
-       if (ret == -1) {
-               DBG(LOG_ERROR,"Failed to ignore vconf key callback MOBILE_HOTSPOT_MODE\n");
-       }
+       if (ret == -1)
+               DBG(LOG_ERROR, "Failed to ignore vconf key callback MOBILE_HOTSPOT_MODE\n");
 
        wfd_ug_view_free_peers(ugd);
        WFD_IF_FREE_MEM(ugd->title);
@@ -669,7 +654,7 @@ static void on_message(ui_gadget_h ug, app_control_h msg, app_control_h control,
                DBG(LOG_DEBUG, "Msg from app: %s", app_msg);
 
                if (!strcmp(app_msg, "destroy")) {
-                       if(!ugd->rename_popup) {
+                       if (!ugd->rename_popup) {
                                DBG(LOG_INFO, "Destroying UG.");
                                wfd_ug_view_free_peers(ugd);
                                wfd_destroy_ug(ugd);
index a1a4f26..18fabf1 100755 (executable)
@@ -72,9 +72,8 @@ static char *_gl_wfd_onoff_text_get(void *data, Evas_Object *obj,
                DBG(LOG_INFO, "%s", ugd->dev_name);
                if (ugd->dev_name) {
                        dev_name = elm_entry_utf8_to_markup(ugd->dev_name);
-                       if (NULL == dev_name) {
+                       if (NULL == dev_name)
                                DBG(LOG_ERROR, "elm_entry_utf8_to_markup failed.\n");
-                       }
                }
        }
 
@@ -82,7 +81,7 @@ static char *_gl_wfd_onoff_text_get(void *data, Evas_Object *obj,
        return dev_name;
 }
 
-static Evas_Object *_gl_wfd_onoff_content_get(void *data,Evas_Object *obj,
+static Evas_Object *_gl_wfd_onoff_content_get(void *data, Evas_Object *obj,
                const char *part)
 {
        __FUNC_ENTER__;
@@ -97,11 +96,11 @@ static Evas_Object *_gl_wfd_onoff_content_get(void *data,Evas_Object *obj,
                elm_layout_theme_set(icon, "layout", "list/C/type.3", "default");
 
                /* Wi-Fi on indication button */
-               btn= elm_check_add(icon);
+               btn = elm_check_add(icon);
                elm_object_style_set(btn, "on&off");
                elm_check_state_set(btn, ugd->wfd_onoff);
                evas_object_propagate_events_set(btn, EINA_FALSE);
-               evas_object_smart_callback_add(btn, "changed",_onoff_changed_cb, ugd);
+               evas_object_smart_callback_add(btn, "changed", _onoff_changed_cb, ugd);
                ugd->on_off_check = btn;
                evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
                evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND,
@@ -173,9 +172,9 @@ static char *_gl_title_label_get(void *data, Evas_Object *obj, const char *part)
 
        WFD_RETV_IF(data == NULL, NULL, "Incorrect parameter(NULL)\n");
        DBG(LOG_INFO, "%s", part);
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp("elm.text", part))
                return g_strdup(D_("IDS_WIFI_HEADER_AVAILABLE_DEVICES_ABB"));
-       }
+
        __FUNC_EXIT__;
        return NULL;
 }
@@ -188,9 +187,8 @@ static char *_gl_title_no_device_label_get(void *data, Evas_Object *obj,
 
        WFD_RETV_IF(data == NULL, NULL, "Incorrect parameter(NULL)\n");
        DBG(LOG_INFO, "%s", part);
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp("elm.text", part))
                return g_strdup(D_("IDS_WIFI_HEADER_AVAILABLE_DEVICES_ABB"));
-       }
 
        __FUNC_EXIT__;
        return NULL;
@@ -201,9 +199,8 @@ static char *_gl_multi_title_label_get(void *data, Evas_Object *obj, const char
        __FUNC_ENTER__;
 
        WFD_RETV_IF(data == NULL, NULL, "Incorrect parameter(NULL)\n");
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp("elm.text", part))
                return g_strdup(D_("IDS_WIFI_HEADER_AVAILABLE_DEVICES_ABB"));
-       }
 
        __FUNC_EXIT__;
        return NULL;
@@ -238,9 +235,8 @@ static char *_gl_available_title_label_get(void *data, Evas_Object *obj, const c
                return NULL;
        }
        DBG(LOG_INFO, "available- %s", part);
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp("elm.text", part))
                return g_strdup(D_("IDS_WIFI_HEADER_AVAILABLE_DEVICES_ABB"));
-       }
 
        __FUNC_EXIT__;
        return NULL;
@@ -323,11 +319,10 @@ static char *_gl_peer_label_get(void *data, Evas_Object *obj, const char *part)
                        g_strlcpy(buf, D_("IDS_WIFI_BODY_CONNECTING_ING"), WFD_GLOBALIZATION_STR_LENGTH);
                        break;
                case PEER_CONN_STATUS_CONNECTED:
-                       if (peer->is_group_owner == FALSE) {
+                       if (peer->is_group_owner == FALSE)
                                g_strlcpy(buf, D_("IDS_COM_BODY_CONNECTED_M_STATUS"), WFD_GLOBALIZATION_STR_LENGTH);
-                       } else {
+                       else
                                g_strlcpy(buf, D_("IDS_CHATON_BODY_AVAILABLE"), WFD_GLOBALIZATION_STR_LENGTH);
-                       }
                        break;
                case PEER_CONN_STATUS_FAILED_TO_CONNECT:
                        g_strlcpy(buf, D_("IDS_CHATON_HEADER_CONNECTION_FAILED_ABB2"), WFD_GLOBALIZATION_STR_LENGTH);
@@ -403,15 +398,14 @@ static Evas_Object *_gl_peer_icon_get(void *data, Evas_Object *obj, const char *
                        img_name = WFD_ICON_DEVICE_DISPLAY;
                        break;
                case WFD_DEVICE_TYPE_MM_DEVICES:
-                       if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_STB) {
+                       if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_STB)
                                img_name = WFD_ICON_DEVICE_STB;
-                       } else if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_MS_MA_ME) {
+                       else if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_MS_MA_ME)
                                img_name = WFD_ICON_DEVICE_DONGLE;
-                       } else if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_PVP) {
+                       else if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_PVP)
                                img_name = WFD_ICON_DEVICE_BD;
-                       } else {
+                       else
                                img_name = WFD_ICON_DEVICE_MULTIMEDIA;
-                       }
                        break;
                case WFD_DEVICE_TYPE_GAME_DEVICES:
                        img_name = WFD_ICON_DEVICE_GAMING;
@@ -420,11 +414,10 @@ static Evas_Object *_gl_peer_icon_get(void *data, Evas_Object *obj, const char *
                        img_name = WFD_ICON_DEVICE_TELEPHONE;
                        break;
                case WFD_DEVICE_TYPE_AUDIO:
-                       if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_TUNER) {
+                       if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_TUNER)
                                img_name = WFD_ICON_DEVICE_HOME_THEATER;
-                       } else {
+                       else
                                img_name = WFD_ICON_DEVICE_HEADSET;
-                       }
                        break;
                default:
                        img_name = WFD_ICON_DEVICE_UNKNOWN;
@@ -515,15 +508,14 @@ static Evas_Object *_gl_conn_peer_icon_get(void *data, Evas_Object *obj, const c
                        img_name = WFD_ICON_DEVICE_DISPLAY;
                        break;
                case WFD_DEVICE_TYPE_MM_DEVICES:
-                       if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_STB) {
+                       if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_STB)
                                img_name = WFD_ICON_DEVICE_STB;
-                       } else if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_MS_MA_ME) {
+                       else if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_MS_MA_ME)
                                img_name = WFD_ICON_DEVICE_DONGLE;
-                       } else if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_PVP) {
+                       else if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_PVP)
                                img_name = WFD_ICON_DEVICE_BD;
-                       } else {
+                       else
                                img_name = WFD_ICON_DEVICE_MULTIMEDIA;
-                       }
                        break;
                case WFD_DEVICE_TYPE_GAME_DEVICES:
                        img_name = WFD_ICON_DEVICE_GAMING;
@@ -532,11 +524,10 @@ static Evas_Object *_gl_conn_peer_icon_get(void *data, Evas_Object *obj, const c
                        img_name = WFD_ICON_DEVICE_TELEPHONE;
                        break;
                case WFD_DEVICE_TYPE_AUDIO:
-                       if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_TUNER) {
+                       if (peer->sub_category == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_TUNER)
                                img_name = WFD_ICON_DEVICE_HOME_THEATER;
-                       } else {
+                       else
                                img_name = WFD_ICON_DEVICE_HEADSET;
-                       }
                        break;
                default:
                        img_name = WFD_ICON_DEVICE_UNKNOWN;
@@ -576,10 +567,10 @@ static char *_gl_noitem_text_get(void *data, Evas_Object *obj, const char *part)
                return NULL;
        }
 
-       DBG(LOG_INFO,"part = %s",part);
-       if (!strcmp("elm.text", part)) {
+       DBG(LOG_INFO, "part = %s", part);
+       if (!strcmp("elm.text", part))
                return g_strdup(D_("IDS_BT_BODY_NO_DEVICES_FOUND_ABB"));
-       }
+
        __FUNC_EXIT__;
        return NULL;
 }
@@ -599,10 +590,9 @@ static char *_gl_conn_dev_title_label_get(void *data, Evas_Object *obj, const ch
                DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
                return NULL;
        }
-       DBG(LOG_INFO,"part = %s",part);
-       if (!strcmp("elm.text", part)) {
+       DBG(LOG_INFO, "part = %s", part);
+       if (!strcmp("elm.text", part))
                return g_strdup(D_("IDS_ST_HEADER_CONNECTED_DEVICES"));
-       }
 
        __FUNC_EXIT__;
        return NULL;
@@ -613,11 +603,11 @@ char* ConvertRGBAtoHex(int r, int g, int b, int a)
        int hexcolor = 0;
        char *string = NULL;
        string = g_try_malloc0(MAX_HEX_COLOR_LENGTH);
-       if (string == NULL) {
+       if (string == NULL)
                return string;
-       }
+
        hexcolor = (r << 24) + (g << 16) + (b << 8) + a;
-       snprintf(string, MAX_HEX_COLOR_LENGTH, "%08x", hexcolor );
+       snprintf(string, MAX_HEX_COLOR_LENGTH, "%08x", hexcolor);
        return string;
 }
 
@@ -688,9 +678,8 @@ static char *_gl_conn_failed_dev_title_label_get(void *data, Evas_Object *obj,
                return NULL;
        }
 
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp("elm.text", part))
                return g_strdup(D_("IDS_WIFI_SBODY_NOT_CONNECTED_M_STATUS_ABB"));
-       }
 
        __FUNC_EXIT__;
        return NULL;
@@ -758,11 +747,10 @@ static char *_gl_multi_connect_dev_title_label_get(void *data, Evas_Object *obj,
        DBG(LOG_INFO, "%s", part);
 
        if (!strcmp("elm.text", part) && ugd) {
-               if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_IN_PROGRESS) {
+               if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_IN_PROGRESS)
                        return g_strdup(D_("IDS_WIFI_HEADER_AVAILABLE_DEVICES_ABB"));
-               } else if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_COMPLETED) {
+               else if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_COMPLETED)
                        return g_strdup(D_("IDS_WIFI_SBODY_NOT_CONNECTED_M_STATUS_ABB"));
-               }
        }
 
        __FUNC_EXIT__;
@@ -817,9 +805,9 @@ static Evas_Object *_wfd_gl_select_all_icon_get(void *data, Evas_Object *obj, co
                DBG(LOG_INFO, "Part %s", part);
                check = elm_check_add(icon_layout);
                ugd->select_all_icon = check;
-               if (ugd->is_select_all_checked == EINA_TRUE) {
+               if (ugd->is_select_all_checked == EINA_TRUE)
                        elm_check_state_set(ugd->select_all_icon, TRUE);
-               }
+
                elm_object_style_set(check, "default/genlist");
                evas_object_propagate_events_set(check, EINA_FALSE);
                evas_object_smart_callback_add(check, "changed",
@@ -848,9 +836,8 @@ static char *_gl_busy_dev_title_label_get(void *data, Evas_Object *obj,
        }
        DBG(LOG_INFO, "%s", part);
 
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp("elm.text", part))
                return g_strdup(D_("IDS_ST_HEADER_BUSY_DEVICES"));
-       }
 
        __FUNC_EXIT__;
        return NULL;
index a53be85..7b3dba0 100755 (executable)
@@ -49,7 +49,7 @@ void scan_button_create(struct ug_data *ugd)
                wfd_ug_view_refresh_button(btn, "IDS_WIFI_SK4_SCAN",
                        FALSE);
        }
-       evas_object_smart_callback_add(btn, "clicked",_scan_btn_cb, (void *)ugd);
+       evas_object_smart_callback_add(btn, "clicked", _scan_btn_cb, (void *)ugd);
        elm_layout_content_set(ugd->button_layout, "button.big", btn);
        ugd->scan_toolbar = btn;
 
@@ -98,15 +98,13 @@ Eina_Bool _back_btn_cb(void *data, Elm_Object_Item *it)
                if (ugd->is_conn_incoming) {
                        DBG(LOG_INFO, "Reject the incoming connection before client deregister \n");
                        ret = wifi_direct_reject_connection(ugd->mac_addr_connecting);
-                       if (ret != WIFI_DIRECT_ERROR_NONE) {
+                       if (ret != WIFI_DIRECT_ERROR_NONE)
                                DBG(LOG_ERROR, "Failed to send reject request [%d]\n", ret);
-                       }
                } else {
                        DBG(LOG_INFO, "Cancel the outgoing connection before client deregister \n");
                        ret = wifi_direct_cancel_connection(ugd->mac_addr_connecting);
-                       if (ret != WIFI_DIRECT_ERROR_NONE) {
+                       if (ret != WIFI_DIRECT_ERROR_NONE)
                                DBG(LOG_ERROR, "Failed to send cancel request [%d]\n", ret);
-                       }
                }
                ugd->mac_addr_connecting = NULL;
        }
@@ -114,9 +112,8 @@ Eina_Bool _back_btn_cb(void *data, Elm_Object_Item *it)
        if (ugd->raw_connected_peer_cnt == 0) {
                ret = wifi_direct_is_group_owner(&owner);
                if (ret == WIFI_DIRECT_ERROR_NONE) {
-                       if (owner) {
+                       if (owner)
                                wifi_direct_destroy_group();
-                       }
                }
        }
 
@@ -126,11 +123,10 @@ cleanup:
        if (ret) {
                DBG(LOG_ERROR, "Failed to create control");
        } else {
-               if (ugd->wfd_status > WIFI_DIRECT_STATE_CONNECTING) {
+               if (ugd->wfd_status > WIFI_DIRECT_STATE_CONNECTING)
                        app_control_add_extra_data(control, "Connection", "TRUE");
-               } else {
+               else
                        app_control_add_extra_data(control, "Connection", "FALSE");
-               }
 
                ug_send_result(ugd->ug, control);
                app_control_destroy(control);
@@ -156,7 +152,7 @@ void _smart_back_btn_cb(void *data, Evas_Object *obj, void *event_info)
        bool owner = FALSE;
        app_control_h control = NULL;
 
-       if(ugd == NULL) {
+       if (ugd == NULL) {
                DBG(LOG_ERROR, "The param is NULL");
                return;
        }
@@ -184,15 +180,13 @@ void _smart_back_btn_cb(void *data, Evas_Object *obj, void *event_info)
                if (ugd->is_conn_incoming) {
                        DBG(LOG_INFO, "Reject the incoming connection before client deregister \n");
                        ret = wifi_direct_reject_connection(ugd->mac_addr_connecting);
-                       if (ret != WIFI_DIRECT_ERROR_NONE) {
+                       if (ret != WIFI_DIRECT_ERROR_NONE)
                                DBG(LOG_ERROR, "Failed to send reject request [%d]\n", ret);
-                       }
                } else {
                        DBG(LOG_INFO, "Cancel the outgoing connection before client deregister \n");
                        ret = wifi_direct_cancel_connection(ugd->mac_addr_connecting);
-                       if (ret != WIFI_DIRECT_ERROR_NONE) {
+                       if (ret != WIFI_DIRECT_ERROR_NONE)
                                DBG(LOG_ERROR, "Failed to send cancel request [%d]\n", ret);
-                       }
                }
                ugd->mac_addr_connecting = NULL;
        }
@@ -200,9 +194,8 @@ void _smart_back_btn_cb(void *data, Evas_Object *obj, void *event_info)
        if (ugd->raw_connected_peer_cnt == 0) {
                ret = wifi_direct_is_group_owner(&owner);
                if (ret == WIFI_DIRECT_ERROR_NONE) {
-                       if (owner) {
+                       if (owner)
                                wifi_direct_destroy_group();
-                       }
                }
        }
 
@@ -212,11 +205,10 @@ cleanup:
        if (ret) {
                DBG(LOG_ERROR, "Failed to create control");
        } else {
-               if (ugd->wfd_status > WIFI_DIRECT_STATE_CONNECTING) {
+               if (ugd->wfd_status > WIFI_DIRECT_STATE_CONNECTING)
                        app_control_add_extra_data(control, "Connection", "TRUE");
-               } else {
+               else
                        app_control_add_extra_data(control, "Connection", "FALSE");
-               }
 
                ug_send_result(ugd->ug, control);
                app_control_destroy(control);
@@ -231,9 +223,9 @@ void wfd_cancel_progressbar_stop_timer(struct ug_data *ugd)
 {
        __FUNC_ENTER__;
 
-       if(ugd->timer_stop_progress_bar > 0) {
+       if (ugd->timer_stop_progress_bar > 0)
                g_source_remove(ugd->timer_stop_progress_bar);
-       }
+
        ugd->timer_stop_progress_bar = 0;
 
        __FUNC_EXIT__;
@@ -243,9 +235,9 @@ void wfd_cancel_not_alive_delete_timer(struct ug_data *ugd)
 {
        __FUNC_ENTER__;
 
-       if(ugd->timer_delete_not_alive_peer > 0) {
+       if (ugd->timer_delete_not_alive_peer > 0)
                g_source_remove(ugd->timer_delete_not_alive_peer);
-       }
+
        ugd->timer_delete_not_alive_peer = 0;
 
        __FUNC_EXIT__;
@@ -314,7 +306,7 @@ void _scan_btn_cb(void *data, Evas_Object *obj, void *event_info)
        int ret = -1;
        const char *btn_text = NULL;
        btn_text = elm_object_part_text_get(ugd->scan_toolbar, "default");
-       DBG(LOG_INFO, "Button text=%s",btn_text);
+       DBG(LOG_INFO, "Button text=%s", btn_text);
 
        if (!g_strcmp0(elm_object_text_get(obj), D_("IDS_WIFI_SK4_SCAN"))) {
                wfd_refresh_wifi_direct_state(ugd);
@@ -354,18 +346,18 @@ void _scan_btn_cb(void *data, Evas_Object *obj, void *event_info)
 void wfd_check_gl_busy_peers(struct ug_data *ugd)
 {
        __FUNC_ENTER__;
-       if (ugd->gl_busy_peer_cnt == 0) {
+       if (ugd->gl_busy_peer_cnt == 0)
                WFD_IF_DEL_ITEM(ugd->busy_wfd_item);
-       }
+
        __FUNC_EXIT__;
 }
 
 void wfd_check_gl_available_peers(struct ug_data *ugd)
 {
        __FUNC_ENTER__;
-       if (ugd->gl_available_peer_cnt == 0 && ugd->avlbl_wfd_item != NULL) {
+       if (ugd->gl_available_peer_cnt == 0 && ugd->avlbl_wfd_item != NULL)
                WFD_IF_DEL_ITEM(ugd->avlbl_wfd_item);
-       }
+
        __FUNC_EXIT__;
 }
 
@@ -388,11 +380,11 @@ void free_gl_peer(device_type_s **start_pos, const char *mac_addr, int *cnt)
        }
 
        while (peer) {
-               if(strcmp(peer->mac_addr, mac_addr)) {
+               if (strcmp(peer->mac_addr, mac_addr)) {
                        peer_tmp = peer;
                        peer = peer->next;
                } else {
-                       if(peer->next != NULL) {
+                       if (peer->next != NULL) {
                                peer_tmp->next = peer->next;
                                break;
                        } else {
@@ -442,15 +434,15 @@ static void _gl_peer_sel(void *data, Evas_Object *obj, void *event_info)
        }
 
        wfd_ug_get_connected_peers(ugd);
-       DBG(LOG_INFO, "No of connected peers= %d",ugd->raw_connected_peer_cnt);
+       DBG(LOG_INFO, "No of connected peers= %d", ugd->raw_connected_peer_cnt);
 
        if (ugd->raw_connected_peer_cnt >= MAX_CONNECTED_PEER_NUM) {
                format_str = D_("IDS_ST_POP_YOU_CAN_CONNECT_UP_TO_PD_DEVICES_AT_THE_SAME_TIME");
                snprintf(popup_text, MAX_POPUP_TEXT_SIZE, format_str, MAX_CONNECTED_PEER_NUM);
                wfd_ug_warn_popup(ugd, popup_text, POP_TYPE_MULTI_CONNECT_POPUP);
-               if (item) {
+               if (item)
                        elm_genlist_item_selected_set(item, EINA_FALSE);
-               }
+
                return;
        }
 
@@ -462,9 +454,8 @@ static void _gl_peer_sel(void *data, Evas_Object *obj, void *event_info)
                elm_layout_content_set(ugd->button_layout, "button.big", ugd->scan_toolbar);
        }
 
-       if (item) {
+       if (item)
                elm_genlist_item_selected_set(item, EINA_FALSE);
-       }
 
        GList *iterator = NULL;
 
@@ -480,7 +471,7 @@ static void _gl_peer_sel(void *data, Evas_Object *obj, void *event_info)
                /* peer exists only in genlist, waiting to be deleted */
                device_type_s *peer_start = ugd->gl_avlb_peers_start;
                for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
-                       if(!strncmp(peer_start->mac_addr, peer->mac_addr, MAC_LENGTH)) {
+                       if (!strncmp(peer_start->mac_addr, peer->mac_addr, MAC_LENGTH)) {
                                DBG(LOG_INFO, "Device [%s] found in genlist, but it is already lost", ((device_type_s *)iterator->data)->ssid);
                                snprintf(txt, sizeof(txt), "Cannot find device %s", ((device_type_s *)iterator->data)->ssid);
                                free_gl_peer(&ugd->gl_avlb_peers_start, ((device_type_s *)iterator->data)->mac_addr, &ugd->gl_available_peer_cnt);
@@ -531,9 +522,8 @@ static void _gl_busy_peer_sel(void *data, Evas_Object *obj, void *event_info)
        struct ug_data *ugd = (struct ug_data *)wfd_get_ug_data();
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
 
-       if (item) {
+       if (item)
                elm_genlist_item_selected_set(item, EINA_FALSE);
-       }
 
        if (NULL == ugd) {
                DBG(LOG_ERROR, "Data is NULL\n");
@@ -583,26 +573,26 @@ void _ctxpopup_move()
        changed_ang = elm_win_rotation_get(ugd->win);
 
        switch (changed_ang) {
-               case 0:
-               case 180:
-                       move_x = win_w/2;
-                       move_y = win_h;
-                       break;
+       case 0:
+       case 180:
+               move_x = win_w/2;
+               move_y = win_h;
+               break;
 
-               case 90:
-                       move_x = win_h/2;
-                       move_y = win_w;
-                       break;
+       case 90:
+               move_x = win_h/2;
+               move_y = win_w;
+               break;
 
-               case 270:
-                       move_x = win_h/2;
-                       move_y = win_w;
-                       break;
+       case 270:
+               move_x = win_h/2;
+               move_y = win_w;
+               break;
 
-               default:
-                       move_x = 0;
-                       move_y = 0;
-                       break;
+       default:
+               move_x = 0;
+               move_y = 0;
+               break;
        }
 
        evas_object_move(ugd->ctxpopup, move_x, move_y);
@@ -648,9 +638,8 @@ void _more_button_cb(void *data, Evas_Object *obj, void *event_info)
 
        ugd->more_btn_multiconnect_item = NULL;
 
-       if (ugd->ctxpopup) {
+       if (ugd->ctxpopup)
                evas_object_del(ugd->ctxpopup);
-       }
 
        ugd->ctxpopup = elm_ctxpopup_add(naviframe);
        elm_object_style_set(ugd->ctxpopup, "more/default");
@@ -692,14 +681,12 @@ void _wfd_realize_item(Elm_Object_Item *pre_item, int count)
 {
        __FUNC_ENTER__;
        int i = 0;
-       if (count < 1 || pre_item == NULL) {
+       if (count < 1 || pre_item == NULL)
                return;
-       }
 
        Elm_Object_Item *item = elm_genlist_item_next_get(pre_item);
-       if (item == NULL) {
+       if (item == NULL)
                return;
-       }
 
        if (count == 1) {
                elm_object_item_signal_emit(item, "elm,state,normal", "");
@@ -707,13 +694,12 @@ void _wfd_realize_item(Elm_Object_Item *pre_item, int count)
        }
 
        for (i = 0; i < count; i++) {
-               if (i == 0) {
+               if (i == 0)
                        elm_object_item_signal_emit(item, "elm,state,top", "");
-               } else if (i == count - 1) {
+               else if (i == count - 1)
                        elm_object_item_signal_emit(item, "elm,state,bottom", "");
-               } else {
+               else
                        elm_object_item_signal_emit(item, "elm,state,center", "");
-               }
 
                item = elm_genlist_item_next_get(item);
        }
@@ -771,11 +757,10 @@ static void _gl_realized(void *data, Evas_Object *obj, void *event_info)
                Evas_Object *check = elm_object_item_part_content_get(item, "elm.icon");
                if (check) {
                        Eina_Bool state = elm_check_state_get(check);
-                       if (state) {
+                       if (state)
                                sr_msg = strdup(SR_CHECKBOX_ON_MSG);
-                       } else {
+                       else
                                sr_msg = strdup(SR_CHECKBOX_OFF_MSG);
-                       }
 
                        if (sr_msg) {
                                Evas_Object *ao = NULL;
@@ -839,9 +824,9 @@ void _wfd_ug_cancel_connection_button_cb(void *data, Evas_Object * obj, void *ev
 void wfd_ug_view_refresh_glitem(Elm_Object_Item *gl_item)
 {
        __FUNC_ENTER__;
-       if (gl_item != NULL) {
+       if (gl_item != NULL)
                elm_genlist_item_update(gl_item);
-       }
+
        __FUNC_EXIT__;
 }
 
@@ -903,23 +888,19 @@ static bool __wfd_is_device_busy(struct ug_data *ugd, device_type_s *dev)
        __FUNC_ENTER__;
 
        if (ugd->I_am_group_owner == TRUE) {
-               if (dev->is_connected || dev->is_group_owner) {
+               if (dev->is_connected || dev->is_group_owner)
                        return TRUE;
-               } else {
+               else
                        return FALSE;
-               }
        } else {
-               if (dev->is_connected == TRUE && dev->is_group_owner == TRUE) {
+               if (dev->is_connected == TRUE && dev->is_group_owner == TRUE)
                        return FALSE;
-               }
 
-               if (dev->is_connected == TRUE && dev->is_group_owner == FALSE) {
+               if (dev->is_connected == TRUE && dev->is_group_owner == FALSE)
                        return TRUE;
-               }
 
-               if (dev->is_connected == FALSE) {
+               if (dev->is_connected == FALSE)
                        return FALSE;
-               }
        }
 
        __FUNC_EXIT__;
@@ -939,13 +920,12 @@ static bool __wfd_is_any_device_available(struct ug_data *ugd, int* no_of_availa
 
        for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
                /* Not include the device which is connected with me */
-               if (__wfd_is_device_connected_with_me(ugd, (device_type_s *)iterator->data)) {
+               if (__wfd_is_device_connected_with_me(ugd, (device_type_s *)iterator->data))
                        continue;
-               }
+
                if (!__wfd_is_device_busy(ugd, (device_type_s *)iterator->data) &&
-                       ((device_type_s *)iterator->data)->conn_status != PEER_CONN_STATUS_FAILED_TO_CONNECT) {
+                       ((device_type_s *)iterator->data)->conn_status != PEER_CONN_STATUS_FAILED_TO_CONNECT)
                        (*no_of_available_dev)++;
-               }
        }
 
        __FUNC_EXIT__;
@@ -965,12 +945,11 @@ static bool __wfd_is_any_device_busy(struct ug_data *ugd, int* no_of_busy_dev)
 
        for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
                /* Not include the device which is connected with me */
-               if (__wfd_is_device_connected_with_me(ugd, (device_type_s *)iterator->data)) {
+               if (__wfd_is_device_connected_with_me(ugd, (device_type_s *)iterator->data))
                        continue;
-               }
-               if (__wfd_is_device_busy(ugd, (device_type_s *)iterator->data)) {
+
+               if (__wfd_is_device_busy(ugd, (device_type_s *)iterator->data))
                        (*no_of_busy_dev)++;
-               }
        }
 
        __FUNC_EXIT__;
@@ -990,9 +969,9 @@ static bool __wfd_is_any_device_connect_failed(struct ug_data *ugd, int* no_of_c
 
        for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
                /* Not include the device which is connected with me */
-               if (__wfd_is_device_connected_with_me(ugd, (device_type_s *)iterator->data)) {
+               if (__wfd_is_device_connected_with_me(ugd, (device_type_s *)iterator->data))
                        continue;
-               }
+
                if (!__wfd_is_device_busy(ugd, (device_type_s *)iterator->data) &&
                        ((device_type_s *)iterator->data)->conn_status == PEER_CONN_STATUS_FAILED_TO_CONNECT) {
                        (*no_of_connect_failed_dev)++;
@@ -1024,7 +1003,7 @@ static Evas_Object *_create_basic_genlist(void *data)
        /* Wifi ON/OFF toggle button */
 #ifdef WFD_ON_OFF_GENLIST
        ugd->item_wifi_onoff = elm_genlist_item_append(genlist, &wfd_onoff_itc, ugd,
-                       NULL, ELM_GENLIST_ITEM_NONE,_onoff_changed_cb, ugd);
+                       NULL, ELM_GENLIST_ITEM_NONE, _onoff_changed_cb, ugd);
        elm_genlist_item_selected_set(ugd->item_wifi_onoff,
                                        EINA_FALSE);
 #endif
@@ -1032,7 +1011,7 @@ static Evas_Object *_create_basic_genlist(void *data)
        evas_object_smart_callback_add(genlist, "unrealized", _gl_unrealized, ugd);
        ugd->device_name_item = elm_genlist_item_append(genlist, &device_name_itc, ugd, NULL,
                ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if(ugd->device_name_item != NULL)
+       if (ugd->device_name_item != NULL)
                elm_genlist_item_select_mode_set(ugd->device_name_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
        __FUNC_EXIT__;
@@ -1055,9 +1034,9 @@ Evas_Object *_create_no_device_genlist(void *data)
 
        if (ugd->conn_wfd_item != NULL) {
                last_item = ugd->conn_wfd_item;
-               for (i = 0; i < ugd->gl_connected_peer_cnt; i++) {
+               for (i = 0; i < ugd->gl_connected_peer_cnt; i++)
                        last_item = elm_genlist_item_next_get(last_item);
-               }
+
        } else {
                last_item = ugd->device_name_item;
        }
@@ -1065,12 +1044,12 @@ Evas_Object *_create_no_device_genlist(void *data)
        ugd->nodevice_title_item = elm_genlist_item_insert_after(ugd->genlist,
                &title_no_device_itc, (void *)ugd, NULL, last_item,
                ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if(ugd->nodevice_title_item != NULL)
+       if (ugd->nodevice_title_item != NULL)
                elm_genlist_item_select_mode_set(ugd->nodevice_title_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
        ugd->nodevice_item = elm_genlist_item_insert_after(ugd->genlist, &noitem_itc, (void *)ugd, NULL,
                ugd->nodevice_title_item, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if(ugd->nodevice_item != NULL)
+       if (ugd->nodevice_item != NULL)
                elm_genlist_item_select_mode_set(ugd->nodevice_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
        __FUNC_EXIT__;
@@ -1089,7 +1068,7 @@ int _create_busy_dev_list(void *data)
 
        ugd->busy_wfd_item = elm_genlist_item_append(ugd->genlist, &title_busy_itc, (void *)ugd,
                NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if(ugd->busy_wfd_item != NULL)
+       if (ugd->busy_wfd_item != NULL)
                elm_genlist_item_select_mode_set(ugd->busy_wfd_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        __FUNC_EXIT__;
        return 0;
@@ -1119,16 +1098,16 @@ int _create_available_dev_genlist(void *data)
 
        if (ugd->conn_wfd_item != NULL) {
                last_item = ugd->conn_wfd_item;
-               for (i=0; i<ugd->gl_connected_peer_cnt; i++) {
+               for (i = 0; i < ugd->gl_connected_peer_cnt; i++)
                        last_item = elm_genlist_item_next_get(last_item);
-               }
+
        } else {
                last_item = ugd->device_name_item;
        }
 
        ugd->avlbl_wfd_item = elm_genlist_item_insert_after(ugd->genlist, &title_available_itc, (void *)ugd, NULL,
                last_item, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if(ugd->avlbl_wfd_item != NULL) {
+       if (ugd->avlbl_wfd_item != NULL) {
                elm_genlist_item_select_mode_set(ugd->avlbl_wfd_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
                elm_genlist_item_update(ugd->avlbl_wfd_item);
        }
@@ -1148,7 +1127,7 @@ static int _create_multi_connect_dev_genlist(void *data)
 
        ugd->multi_connect_wfd_item = elm_genlist_item_insert_after(ugd->genlist, &title_multi_connect_itc, (void *)ugd,
                                                                NULL, ugd->device_name_item, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if(ugd->multi_connect_wfd_item != NULL)
+       if (ugd->multi_connect_wfd_item != NULL)
                elm_genlist_item_select_mode_set(ugd->multi_connect_wfd_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        __FUNC_EXIT__;
        return 0;
@@ -1166,7 +1145,7 @@ int _create_connected_dev_genlist(void *data)
 
        ugd->conn_wfd_item = elm_genlist_item_insert_after(ugd->genlist, &title_conn_itc, (void *)ugd, NULL,
                ugd->device_name_item, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if(ugd->conn_wfd_item != NULL) {
+       if (ugd->conn_wfd_item != NULL) {
                elm_genlist_item_select_mode_set(ugd->conn_wfd_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
                elm_genlist_item_update(ugd->conn_wfd_item);
        }
@@ -1189,21 +1168,21 @@ int _create_connected_failed_dev_genlist(void *data)
 
        if (ugd->avlbl_wfd_item != NULL) {
                last_item = ugd->avlbl_wfd_item;
-               for (i=0; i<ugd->gl_available_peer_cnt; i++) {
+               for (i = 0; i < ugd->gl_available_peer_cnt; i++)
                        last_item = elm_genlist_item_next_get(last_item);
-               }
+
        } else if (ugd->conn_wfd_item != NULL) {
                last_item = ugd->conn_wfd_item;
-               for (i=0; i<ugd->gl_connected_peer_cnt; i++) {
+               for (i = 0; i < ugd->gl_connected_peer_cnt; i++)
                        last_item = elm_genlist_item_next_get(last_item);
-               }
+
        } else {
                last_item = ugd->device_name_item;
        }
 
        ugd->conn_failed_wfd_item = elm_genlist_item_insert_after(ugd->genlist, &title_conn_failed_itc, (void *)ugd,
                                                                NULL, last_item, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if(ugd->conn_failed_wfd_item != NULL)
+       if (ugd->conn_failed_wfd_item != NULL)
                elm_genlist_item_select_mode_set(ugd->conn_failed_wfd_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        __FUNC_EXIT__;
        return 0;
@@ -1226,9 +1205,8 @@ static Eina_Bool _connect_failed_peers_display_cb(void *user_data)
                return ECORE_CALLBACK_CANCEL;
        }
 
-       if (ugd->avlbl_wfd_item == NULL) {
+       if (ugd->avlbl_wfd_item == NULL)
                _create_available_dev_genlist(ugd);
-       }
 
        if (ugd->wfd_discovery_status == WIFI_DIRECT_DISCOVERY_BACKGROUND) {
                DBG(LOG_INFO, "Background mode\n");
@@ -1238,9 +1216,8 @@ static Eina_Bool _connect_failed_peers_display_cb(void *user_data)
 
        /* check the timeout, if not timeout, keep the cb */
        interval = time(NULL) - ugd->last_display_time;
-       if (interval < MAX_DISPLAY_TIME_OUT) {
+       if (interval < MAX_DISPLAY_TIME_OUT)
                return ECORE_CALLBACK_RENEW;
-       }
 
        if (ugd->is_paused == false) {
                DBG(LOG_INFO, "Not Paused");
@@ -1279,9 +1256,9 @@ void wfd_ug_view_free_peer(device_type_s *gl_peers_start)
 void wfd_check_gl_conn_peers(struct ug_data *ugd)
 {
        __FUNC_ENTER__;
-       if (ugd->gl_connected_peer_cnt == 0) {
+       if (ugd->gl_connected_peer_cnt == 0)
                WFD_IF_DEL_ITEM(ugd->conn_wfd_item);
-       }
+
        __FUNC_EXIT__;
 }
 
@@ -1324,9 +1301,8 @@ void wfd_ug_view_free_peers(void *data)
                ugd->gl_mul_conn_peers_start = NULL;
        }
 
-       if (ugd->gl_connected_peer_cnt == 0) {
+       if (ugd->gl_connected_peer_cnt == 0)
                WFD_IF_DEL_ITEM(ugd->conn_wfd_item);
-       }
 
        if (ugd->display_timer != NULL) {
                ecore_timer_del(ugd->display_timer);
@@ -1350,7 +1326,7 @@ void wfd_ug_update_toolbar(struct ug_data *ugd)
        wfd_refresh_wifi_direct_state(ugd);
        if (ugd->wfd_status == WIFI_DIRECT_STATE_CONNECTING) {
                DBG(LOG_INFO, "WIFI_DIRECT_STATE_CONNECTING\n");
-               ifugd->multi_connect_wfd_item != NULL) {
+               if (ugd->multi_connect_wfd_item != NULL) {
                        DBG(LOG_INFO, "multi_connect_toolbar_item\n");
                        btn = elm_button_add(ugd->button_layout);
                        /* Use "bottom" style button */
@@ -1425,9 +1401,8 @@ void wfd_ug_view_init_genlist(void *data, bool is_free_all_peers)
        int no_of_available_dev = 0;
        int no_of_conn_failed_dev = 0;
 
-       if (is_free_all_peers) {
+       if (is_free_all_peers)
                wfd_ug_view_free_peers(ugd);
-       }
 
        if (ugd->gl_failed_peers_start != NULL) {
                DBG(LOG_INFO, "These are failed peers, must clear them");
@@ -1490,16 +1465,16 @@ void delete_not_alive_peers(struct ug_data *ugd, device_type_s **start_pos, int
        device_type_s *peer_tmp = NULL;
        while (peer != NULL) {
                peer_tmp = peer->next;
-               if(peer->is_alive == false) {
+               if (peer->is_alive == false)
                         free_gl_peer(start_pos, peer->mac_addr, cnt);
-               }
+
                peer = peer_tmp;
        }
 
 //     wfd_check_gl_available_peers(ugd);
-       if (ugd->gl_busy_peer_cnt == 0) {
+       if (ugd->gl_busy_peer_cnt == 0)
                WFD_IF_DEL_ITEM(ugd->busy_wfd_item);
-       }
+
        __FUNC_EXIT__;
        return;
 }
@@ -1533,14 +1508,14 @@ Elm_Object_Item *get_insert_postion(device_type_s *peer, Elm_Object_Item *pre_it
        Elm_Object_Item *head = elm_genlist_item_next_get(pre_item);
        Elm_Object_Item *item = NULL;
 
-       if(peer_cnt == 0) {
+       if (peer_cnt == 0) {
                DBG(LOG_INFO, "first peer [%s] would be added", peer->ssid);
                return pre_item;
        }
 
        peer_ite = (device_type_s *)elm_object_item_data_get(head);
-       if(peer_ite->gl_item != NULL) {
-               for(i=0; i < peer_cnt; i++) {
+       if (peer_ite->gl_item != NULL) {
+               for (i = 0; i < peer_cnt; i++) {
                        if (strcasecmp(peer_ite->ssid, peer->ssid) > 0) {
                                /* if peer_ite is greater than peer, return previous item */
                                __FUNC_EXIT__;
@@ -1578,11 +1553,11 @@ int insert_gl_item(Evas_Object *genlist, Elm_Object_Item *item, Elm_Gen_Item_Cla
        memcpy(peer, peer_for_insert, sizeof(device_type_s));
        peer->next = NULL;
 
-       if(*start_pos == NULL) {
+       if (*start_pos == NULL) {
                *start_pos = peer;
        } else {
                peer_ite = *start_pos;
-               while(peer_ite->next != NULL) {
+               while (peer_ite->next != NULL) {
                        /* move pointer to the last peer */
                        peer_ite = peer_ite->next;
                }
@@ -1592,9 +1567,9 @@ int insert_gl_item(Evas_Object *genlist, Elm_Object_Item *item, Elm_Gen_Item_Cla
        peer->is_alive = true;
        peer->gl_item = elm_genlist_item_insert_after(genlist, itc, (void *)peer, NULL, item,
                ELM_GENLIST_ITEM_NONE, callback, (void *)peer);
-       if (callback == NULL && peer->gl_item != NULL) {
+       if (callback == NULL && peer->gl_item != NULL)
                elm_genlist_item_select_mode_set(peer->gl_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-       }
+
        __FUNC_EXIT__;
        return 0;
 }
@@ -1615,13 +1590,11 @@ void wfd_ug_update_connected_peers(void *data)
        Elm_Object_Item *item = NULL;
 
        res = wifi_direct_is_group_owner(&is_group_owner);
-       if (res == WIFI_DIRECT_ERROR_NONE) {
+       if (res == WIFI_DIRECT_ERROR_NONE)
                DBG(LOG_INFO, "is_group_owner=[%d]", is_group_owner);
-       }
 
-       if (!ugd->conn_wfd_item) {
+       if (!ugd->conn_wfd_item)
                _create_connected_dev_genlist(ugd);
-       }
 
        for (i = 0; i < ugd->raw_connected_peer_cnt; i++) {
                if (find_peer_in_glist(ugd->gl_conn_peers_start, ugd->raw_connected_peers[i].mac_addr) == NULL) {
@@ -1644,9 +1617,9 @@ void wfd_ug_update_connected_peers(void *data)
                                ugd->gl_connected_peer_cnt);
                        res = insert_gl_item(ugd->genlist, item, &peer_conn_itc, &ugd->gl_conn_peers_start,
                                        &ugd->raw_connected_peers[i], NULL);
-                       if (res != 0) {
+                       if (res != 0)
                                break;
-                       }
+
                        ugd->gl_connected_peer_cnt++;
                }
        }
@@ -1701,9 +1674,9 @@ void wfd_ug_view_update_multiconn_peers(void *data)
                                        ugd->multi_connect_wfd_item, ugd->gl_multi_connect_peer_cnt);
                                res = insert_gl_item(ugd->genlist, item, &peer_itc, &ugd->gl_mul_conn_peers_start,
                                                &ugd->raw_multi_selected_peers[i], NULL);
-                               if (res != 0) {
+                               if (res != 0)
                                        break;
-                               }
+
                                ugd->gl_multi_connect_peer_cnt++;
                        }
                }
@@ -1748,15 +1721,15 @@ void wfd_ug_update_available_peers(void *data)
        }
 
        if (no_of_conn_dev == 0 || is_group_owner == TRUE) {
-               if (ugd->avlbl_wfd_item == NULL) {
+               if (ugd->avlbl_wfd_item == NULL)
                        _create_available_dev_genlist(ugd);
-               }
+
 
                for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
                        /* Not include the device which is connected with me */
-                       if (__wfd_is_device_connected_with_me(ugd, (device_type_s *)iterator->data)) {
+                       if (__wfd_is_device_connected_with_me(ugd, (device_type_s *)iterator->data))
                                continue;
-                       }
+
                        if (!__wfd_is_device_busy(ugd, (device_type_s *)iterator->data) &&
                                ((device_type_s *)iterator->data)->conn_status != PEER_CONN_STATUS_FAILED_TO_CONNECT &&
                                ((device_type_s *)iterator->data)->conn_status != PEER_CONN_STATUS_CONNECTED) {
@@ -1769,14 +1742,12 @@ void wfd_ug_update_available_peers(void *data)
                                /* free busy gl peer, which is available now */
                                if (find_peer_in_glist(ugd->gl_busy_peers_start, ((device_type_s *)iterator->data)->mac_addr) != NULL) {
                                        free_gl_peer(&ugd->gl_busy_peers_start, ((device_type_s *)iterator->data)->mac_addr, &ugd->gl_busy_peer_cnt);
-                                       if (ugd->gl_busy_peer_cnt == 0) {
+                                       if (ugd->gl_busy_peer_cnt == 0)
                                                WFD_IF_DEL_ITEM(ugd->busy_wfd_item);
-                                       }
                                }
 
-                               if (find_peer_in_glist(ugd->gl_failed_peers_start, (const char *)((device_type_s *)iterator->data)->mac_addr) != NULL) {
+                               if (find_peer_in_glist(ugd->gl_failed_peers_start, (const char *)((device_type_s *)iterator->data)->mac_addr) != NULL)
                                        continue;
-                               }
 
                                peer = find_peer_in_glist(ugd->gl_avlb_peers_start, (const char *)((device_type_s *)iterator->data)->mac_addr);
                                if (peer == NULL) {
@@ -1784,9 +1755,9 @@ void wfd_ug_update_available_peers(void *data)
                                                ugd->avlbl_wfd_item, ugd->gl_available_peer_cnt);
                                        res = insert_gl_item(ugd->genlist, item, &peer_itc, &ugd->gl_avlb_peers_start,
                                                        (device_type_s *)iterator->data, _gl_peer_sel);
-                                       if (res != 0) {
+                                       if (res != 0)
                                                break;
-                                       }
+
                                        ugd->gl_available_peer_cnt++;
                                } else if (no_of_conn_dev > 0 && ((device_type_s *)iterator->data)->is_group_owner == TRUE) {
                                        /* if peer is GO, free it */
@@ -1801,15 +1772,14 @@ void wfd_ug_update_available_peers(void *data)
        wfd_check_gl_conn_peers(ugd);
 
        if (no_of_conn_dev == 0 && no_of_busy_dev > 0) {
-               if (ugd->busy_wfd_item == NULL) {
+               if (ugd->busy_wfd_item == NULL)
                        _create_busy_dev_list(ugd);
-               }
 
                for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
                        /* Not include the device which is connected with me */
-                       if (__wfd_is_device_connected_with_me(ugd, (device_type_s *)iterator->data)) {
+                       if (__wfd_is_device_connected_with_me(ugd, (device_type_s *)iterator->data))
                                continue;
-                       }
+
                        if (__wfd_is_device_busy(ugd, (device_type_s *)iterator->data) == TRUE) {
                                if (find_peer_in_glist(ugd->gl_busy_peers_start, ((device_type_s *)iterator->data)->mac_addr) == NULL) {
                                        if (find_peer_in_glist(ugd->gl_avlb_peers_start,
@@ -1822,9 +1792,9 @@ void wfd_ug_update_available_peers(void *data)
                                                ugd->gl_busy_peer_cnt);
                                        res = insert_gl_item(ugd->genlist, item, &peer_busy_itc, &ugd->gl_busy_peers_start,
                                                        (device_type_s *)iterator->data, _gl_busy_peer_sel);
-                                       if (res != 0) {
+                                       if (res != 0)
                                                break;
-                                       }
+
                                        ugd->gl_busy_peer_cnt++;
                                }
                        }
@@ -1851,9 +1821,8 @@ void wfd_ug_update_failed_peers(void *data)
        __wfd_is_any_device_connect_failed(ugd, &no_of_conn_failed_dev);
        DBG(LOG_INFO, "conn_failed_dev=[%d]", no_of_conn_failed_dev);
 
-       if (no_of_conn_failed_dev == 0) {
+       if (no_of_conn_failed_dev == 0)
                return;
-       }
 
        /* add timer for disappearing failed peers after N secs */
        if (NULL == ugd->display_timer) {
@@ -1892,11 +1861,11 @@ void _onoff_changed_cb(void *data, Evas_Object *obj, void *event_info)
        WFD_RET_IF(ugd == NULL, "Incorrect parameter(NULL)\n");
        WFD_RET_IF(ugd->on_off_check == NULL, "on_off_check(NULL)\n");
        wfd_refresh_wifi_direct_state(ugd);
-       if(ugd->device_name_item != NULL)
+       if (ugd->device_name_item != NULL)
                elm_genlist_item_update(ugd->device_name_item);
 
        elm_object_disabled_set(ugd->on_off_check, TRUE);
-       if(ugd->disconnect_btn) {
+       if (ugd->disconnect_btn) {
                Evas_Object *content;
                content = elm_object_part_content_unset(ugd->button_layout, "button.next");
                WFD_IF_DEL_OBJ(content);
@@ -1932,16 +1901,15 @@ void wfd_ug_refresh_on_off_check(struct ug_data *ugd)
 
        wfd_refresh_wifi_direct_state(ugd);
        if (ugd->wfd_status == WIFI_DIRECT_STATE_DEACTIVATING ||
-               ugd->wfd_status == WIFI_DIRECT_STATE_ACTIVATING ) {
+               ugd->wfd_status == WIFI_DIRECT_STATE_ACTIVATING)
                elm_object_disabled_set(ugd->on_off_check, TRUE);
-       } else {
+       else
                elm_object_disabled_set(ugd->on_off_check, FALSE);
-       }
-       if (ugd->wfd_status > WIFI_DIRECT_STATE_ACTIVATING) {
+
+       if (ugd->wfd_status > WIFI_DIRECT_STATE_ACTIVATING)
                elm_check_state_set(ugd->on_off_check, TRUE);
-       } else {
+       else
                elm_check_state_set(ugd->on_off_check, FALSE);
-       }
 
        __FUNC_EXIT__;
 }
@@ -2023,9 +1991,8 @@ void create_wfd_ug_view(void *data)
 
        wifi_direct_initialize();
        wifi_direct_get_state(&ugd->wfd_status);
-       if (ugd->wfd_status > WIFI_DIRECT_STATE_DEACTIVATING) {
+       if (ugd->wfd_status > WIFI_DIRECT_STATE_DEACTIVATING)
                scan_button_create(ugd);
-       }
 
        if (ugd->view_type && g_strcmp0(D_(ugd->view_type), D_("IDS_WIFI_BUTTON_MULTI_CONNECT")) == 0) {
                int ret = 0;
index a849c2f..989a6f7 100644 (file)
@@ -143,9 +143,8 @@ void wfd_free_multi_selected_peers(void *data)
        wifi_direct_destroy_group();
 
        /* release the selected peers */
-       for (i = 0; i < ugd->raw_multi_selected_peer_cnt; i++) {
+       for (i = 0; i < ugd->raw_multi_selected_peer_cnt; i++)
                memset(&ugd->raw_multi_selected_peers[i], 0x00, sizeof(device_type_s));
-       }
 
        ugd->raw_multi_selected_peer_cnt = 0;
        ugd->multi_connect_mode = WFD_MULTI_CONNECT_MODE_NONE;
@@ -174,28 +173,26 @@ int wfd_stop_multi_connect(void *data)
        wfd_ug_view_refresh_glitem(ugd->multi_connect_wfd_item);
        wfd_ug_update_toolbar(ugd);
 
-       if (ugd->gl_connected_peer_cnt > 0) {
+       if (ugd->gl_connected_peer_cnt > 0)
                wfd_client_set_p2p_group_owner_intent(7);
-       } else {
+       else
                wifi_direct_destroy_group();
-       }
 
-       if(ugd->timer_multi_reset > 0) {
+       if (ugd->timer_multi_reset > 0)
                g_source_remove(ugd->timer_multi_reset);
-       }
+
        /* after 30s, remove the failed peers */
        ugd->timer_multi_reset = g_timeout_add(30000 /*ms*/,
                __wfd_multi_connect_reset_cb, ugd);
 
-       if (ugd->g_source_multi_connect_next > 0) {
+       if (ugd->g_source_multi_connect_next > 0)
                g_source_remove(ugd->g_source_multi_connect_next);
-       }
+
        ugd->g_source_multi_connect_next = 0;
 
        /*when multi-connect end and auto_exit is true, exit UG*/
-       if (ugd->is_auto_exit) {
+       if (ugd->is_auto_exit)
                _wfd_ug_auto_exit(ugd);
-       }
 
        __FUNC_EXIT__;
        return 0;
@@ -239,8 +236,8 @@ void wfd_sort_multi_selected_peers(struct ug_data *ugd)
        int j = 0;
        device_type_s peer;
 
-       for(i = 0; i < ugd->raw_multi_selected_peer_cnt; i++) {
-               for(j = 0; j < ugd->raw_multi_selected_peer_cnt-i-1; j++) {
+       for (i = 0; i < ugd->raw_multi_selected_peer_cnt; i++) {
+               for (j = 0; j < ugd->raw_multi_selected_peer_cnt-i-1; j++) {
                        if (strcasecmp(ugd->raw_multi_selected_peers[j].ssid, ugd->raw_multi_selected_peers[j + 1].ssid) > 0) {
                                peer = ugd->raw_multi_selected_peers[j];
                                ugd->raw_multi_selected_peers[j] = ugd->raw_multi_selected_peers[j + 1];
@@ -264,9 +261,9 @@ gboolean wfd_multi_connect_next_cb(void *data)
        int res;
 
        // Reset g_source handler..
-       if (ugd->g_source_multi_connect_next > 0) {
+       if (ugd->g_source_multi_connect_next > 0)
                g_source_remove(ugd->g_source_multi_connect_next);
-       }
+
        ugd->g_source_multi_connect_next = 0;
 
        if (ugd->raw_multi_selected_peer_cnt > 0) {
@@ -315,9 +312,9 @@ void _connect_btn_cb(void *data, Evas_Object *obj, void *event_info)
 
        peer = ugd->multi_conn_dev_list_start;
        while (peer != NULL) {
-               if(peer->dev_sel_state) {
+               if (peer->dev_sel_state)
                        count++;
-               }
+
                peer = peer->next;
        }
        DBG(LOG_INFO, "MultiSelected Peer Count: %d", count);
@@ -334,7 +331,7 @@ void _connect_btn_cb(void *data, Evas_Object *obj, void *event_info)
        peer = ugd->multi_conn_dev_list_start;
        count = 0;
        while (peer != NULL) {
-               if(peer->dev_sel_state) {
+               if (peer->dev_sel_state) {
                        DBG(LOG_INFO, "peer_name[%s] select state[%d]", peer->ssid, peer->dev_sel_state);
                        memcpy(&ugd->raw_multi_selected_peers[count], peer, sizeof(device_type_s));
                        ugd->raw_multi_selected_peers[count].conn_status = PEER_CONN_STATUS_WAIT_FOR_CONNECT;
@@ -396,26 +393,25 @@ static void _wfd_gl_multi_sel_cb(void *data, Evas_Object *obj, void *event_info)
 
        ugd->is_multi_check_all_selected = TRUE;
 
-       if(event_info != NULL) {
+       if (event_info != NULL) {
                Evas_Object *content = elm_object_item_part_content_get(event_info, "elm.icon.2");
                chk_box = elm_object_part_content_get(content, "elm.swallow.content");
                state = elm_check_state_get(chk_box);
                DBG(LOG_INFO, "state = %d \n", state);
-               if (chk_box ==  NULL) {
+               if (chk_box ==  NULL)
                        DBG(LOG_INFO, "Check box is null\n");
-               }
        }
 
        object_type = evas_object_type_get(obj);
         if (g_strcmp0(object_type, "elm_genlist") == 0) {
                Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-               if (item) {
+               if (item)
                        elm_genlist_item_selected_set(item, EINA_FALSE);
-               }
+
                DBG(LOG_INFO, "State elm_genlist %d\n", state);
                elm_check_state_set(chk_box, !state);
                peer->dev_sel_state = !state;
-       } else if (g_strcmp0(object_type, "elm_check") == 0){
+       } else if (g_strcmp0(object_type, "elm_check") == 0) {
                DBG(LOG_INFO, "elm_check state; %d\n", peer->dev_sel_state);
                peer->dev_sel_state = !peer->dev_sel_state;
        }
@@ -426,7 +422,7 @@ static void _wfd_gl_multi_sel_cb(void *data, Evas_Object *obj, void *event_info)
 
        peer = ugd->multi_conn_dev_list_start;
        while (peer != NULL) {
-               if(peer->dev_sel_state) {
+               if (peer->dev_sel_state) {
                        is_sel = TRUE;
                        sel_count++;
                } else {
@@ -474,9 +470,8 @@ static char *_wfd_gl_device_label_get(void *data, Evas_Object *obj, const char *
        device_type_s *peer = (device_type_s *)data;
        char *ssid;
 
-       if (NULL == peer) {
+       if (NULL == peer)
                return NULL;
-       }
 
        if (!strcmp("elm.text", part)) {
                if (strlen(peer->ssid) != 0) {
@@ -581,9 +576,9 @@ static Evas_Object *_wfd_gl_device_icon_get(void *data, Evas_Object *obj, const
                icon = elm_check_add(icon_layout);
                elm_object_style_set(icon, "default/genlist");
                evas_object_propagate_events_set(icon, EINA_FALSE);
-               if (peer->dev_sel_state == EINA_TRUE) {
+               if (peer->dev_sel_state == EINA_TRUE)
                        elm_check_state_set(icon, EINA_TRUE);
-               }
+
                evas_object_smart_callback_add(icon,
                        "changed", _wfd_gl_multi_sel_cb, (void *)data);
                elm_layout_content_set(icon_layout, "elm.swallow.content", icon);
@@ -615,7 +610,7 @@ static void _gl_unrealized(void *data, Evas_Object *obj, void *event_info)
        if (ugd->gl_available_dev_cnt_at_multiconn_view > 0) {
                peer = ugd->multi_conn_dev_list_start;
                while (peer != NULL) {
-                       if(peer->dev_sel_state) {
+                       if (peer->dev_sel_state) {
                                is_sel = TRUE;
                                sel_count++;
                        }
@@ -649,9 +644,8 @@ int wfd_free_multiconnect_device(struct ug_data *ugd)
 {
        __FUNC_ENTER__;
 
-       if (ugd->multiconn_view_genlist == NULL) {
+       if (ugd->multiconn_view_genlist == NULL)
                return 0;
-       }
 
        ugd->gl_available_dev_cnt_at_multiconn_view = 0;
        if (ugd->multi_conn_dev_list_start != NULL) {
@@ -677,7 +671,7 @@ Evas_Object *_create_no_device_multiconnect_genlist(struct ug_data *ugd)
 
        if (!ugd->mcview_nodevice_item) {
                ugd->mcview_nodevice_item = elm_genlist_item_append(ugd->multiconn_view_genlist, &noitem_itc, (void *)ugd, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-               if(ugd->mcview_nodevice_item != NULL)
+               if (ugd->mcview_nodevice_item != NULL)
                        elm_genlist_item_select_mode_set(ugd->mcview_nodevice_item , ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        }
 
@@ -701,27 +695,24 @@ int wfd_update_multiconnect_device(struct ug_data *ugd, bool is_free_all_peers)
        int res = 0;
 
        genlist = ugd->multiconn_view_genlist;
-       if (ugd->multiconn_view_genlist == NULL) {
+       if (ugd->multiconn_view_genlist == NULL)
                return 0;
-       }
 
-       if (is_free_all_peers) {
+       if (is_free_all_peers)
                wfd_free_multiconnect_device(ugd);
-       }
 
        GList *iterator = NULL;
        for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
                device = (device_type_s *)iterator->data;
-               if (device->is_connected == FALSE && device->is_group_owner == FALSE) {
+               if (device->is_connected == FALSE && device->is_group_owner == FALSE)
                        count++;
-               }
        }
 
        if (count == 0) {
                DBG(LOG_INFO, "There are No peers\n");
                if (!ugd->mcview_title_item) {
                        ugd->mcview_title_item = elm_genlist_item_append(genlist, &multi_view_title_itc, ugd, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-                       if(ugd->mcview_title_item != NULL)
+                       if (ugd->mcview_title_item != NULL)
                                elm_genlist_item_select_mode_set(ugd->mcview_title_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
                } else {
                        wfd_ug_view_refresh_glitem(ugd->mcview_title_item);
@@ -741,9 +732,9 @@ int wfd_update_multiconnect_device(struct ug_data *ugd, bool is_free_all_peers)
                                        item = get_insert_postion(device, ugd->mcview_title_item, ugd->gl_available_dev_cnt_at_multiconn_view);
                                        res = insert_gl_item(genlist, item, &device_itc, &ugd->multi_conn_dev_list_start,
                                                                device, _wfd_gl_multi_sel_cb);
-                                       if (res != 0) {
+                                       if (res != 0)
                                                break;
-                                       }
+
                                        elm_check_state_set(ugd->select_all_icon, EINA_FALSE);
                                        ugd->is_select_all_checked = FALSE;
 
@@ -796,7 +787,7 @@ void wfd_genlist_select_all_check_changed_cb(void *data, Evas_Object * obj, void
        }
 
        state = elm_check_state_get(ugd->select_all_icon);
-       DBG(LOG_INFO, "state = %d",state);
+       DBG(LOG_INFO, "state = %d", state);
        if (state == EINA_TRUE) {
                if (ugd->is_multi_check_all_selected == FALSE) {
                        int sel_count = 0;
@@ -864,15 +855,14 @@ void _multi_scan_btn_cb(void *data, Evas_Object *obj, void *event_info)
        if (ugd->multiconn_conn_btn) {
                peer = ugd->multi_conn_dev_list_start;
                while (peer) {
-                       if(peer->dev_sel_state) {
+                       if (peer->dev_sel_state) {
                                wfd_ug_view_refresh_button(ugd->multiconn_conn_btn, "IDS_WIFI_SK_CONNECT", TRUE);
                                break;
                        }
                        peer = peer->next;
                }
-               if (!peer) {
+               if (!peer)
                        wfd_ug_view_refresh_button(ugd->multiconn_conn_btn, "IDS_WIFI_SK_CONNECT", FALSE);
-               }
        }
 
        btn_text = elm_object_text_get(ugd->multiconn_scan_stop_btn);
@@ -973,7 +963,7 @@ void wfd_create_multiconnect_view(struct ug_data *ugd)
        elm_naviframe_item_pop_cb_set(navi_item, _multiconnect_view_pop_cb, (void *)ugd);
        ugd->select_all_view_genlist = elm_genlist_item_append(genlist,
                        &select_all_multi_connect_itc, ugd, NULL, ELM_GENLIST_ITEM_NONE,
-                       wfd_genlist_select_all_check_changed_cb, (void *)ugd );
+                       wfd_genlist_select_all_check_changed_cb, (void *)ugd);
 
 
        btn1 = elm_button_add(ugd->multiconn_layout);
@@ -987,7 +977,7 @@ void wfd_create_multiconnect_view(struct ug_data *ugd)
                                "IDS_WIFI_SK_STOP");
        }
        elm_object_part_content_set(ugd->multiconn_layout, "button.prev", btn1);
-       evas_object_smart_callback_add(btn1, "clicked",_multi_scan_btn_cb, (void *)ugd);
+       evas_object_smart_callback_add(btn1, "clicked", _multi_scan_btn_cb, (void *)ugd);
        evas_object_show(btn1);
        ugd->multiconn_scan_stop_btn = btn1;
 
@@ -996,7 +986,7 @@ void wfd_create_multiconnect_view(struct ug_data *ugd)
        elm_object_domain_translatable_text_set(btn2, PACKAGE,
                        "IDS_WIFI_SK_CONNECT");
        elm_object_part_content_set(ugd->multiconn_layout, "button.next", btn2);
-       evas_object_smart_callback_add(btn2, "clicked",_connect_btn_cb, (void *)ugd);
+       evas_object_smart_callback_add(btn2, "clicked", _connect_btn_cb, (void *)ugd);
        evas_object_show(btn2);
        ugd->multiconn_conn_btn = btn2;
        elm_object_disabled_set(ugd->multiconn_conn_btn, EINA_TRUE);
index bda5677..8ad8bbf 100755 (executable)
@@ -57,9 +57,9 @@ static void pushbutton_accept_connect_cb(void *data, Evas_Object * obj,
        }
        int result = -1;
        result = wifi_direct_accept_connection(ugd->mac_addr_req);
-       if (result != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_INFO,"Failed to connect");
-       }
+       if (result != WIFI_DIRECT_ERROR_NONE)
+               DBG(LOG_INFO, "Failed to connect");
+
        delete_popup(ugd);
 
        __FUNC_EXIT__;
@@ -79,9 +79,9 @@ static void pushbutton_reject_connect_cb(void *data, Evas_Object * obj,
        if (ugd->mac_addr_req[0] != '\0') {
                result = wifi_direct_reject_connection(ugd->mac_addr_req);
                if (result != WIFI_DIRECT_ERROR_NONE)
-                       DBG(LOG_INFO,"Failed to reject connection");
+                       DBG(LOG_INFO, "Failed to reject connection");
        } else {
-               DBG(LOG_INFO,"No Peer mac address");
+               DBG(LOG_INFO, "No Peer mac address");
        }
        delete_popup(ugd);
 
@@ -200,17 +200,15 @@ static void _wfd_ug_act_popup_hotspot_ok_cb(void *data, Evas_Object *obj, void *
 #endif
 
                /* while activating/deactivating, disable the buttons */
-               if (ugd->scan_toolbar) {
+               if (ugd->scan_toolbar)
                        wfd_ug_view_refresh_button(ugd->scan_toolbar, "IDS_WIFI_SK4_SCAN", FALSE);
-               }
 
-               if (ugd->multiconn_scan_stop_btn) {
+               if (ugd->multiconn_scan_stop_btn)
                        wfd_ug_view_refresh_button(ugd->multiconn_scan_stop_btn, "IDS_WIFI_SK4_SCAN", FALSE);
-               }
 
-               if (ugd->back_btn) {
+               if (ugd->back_btn)
                        elm_object_disabled_set(ugd->back_btn, TRUE);
-               }
+
                ugd->is_hotspot_locally_disabled = TRUE;
        }
 
@@ -266,17 +264,14 @@ static void _wfd_ug_act_popup_wifi_ok_cb(void *data, Evas_Object *obj, void *eve
                }
 #endif
                /* while activating/deactivating, disable the buttons */
-               if (ugd->scan_toolbar) {
+               if (ugd->scan_toolbar)
                        wfd_ug_view_refresh_button(ugd->scan_toolbar, "IDS_WIFI_SK4_SCAN", FALSE);
-               }
 
-               if (ugd->multiconn_scan_stop_btn) {
+               if (ugd->multiconn_scan_stop_btn)
                        wfd_ug_view_refresh_button(ugd->multiconn_scan_stop_btn, "IDS_WIFI_SK4_SCAN", FALSE);
-               }
 
-               if (ugd->back_btn) {
+               if (ugd->back_btn)
                        elm_object_disabled_set(ugd->back_btn, TRUE);
-               }
        }
 
        evas_object_del(ugd->act_popup);
@@ -322,9 +317,8 @@ gboolean _wfd_disconnect_idle_cb(gpointer user_data)
 
        wfd_ug_view_init_genlist(ugd, true);
 
-       if (0 != wfd_client_disconnect(NULL)) {
+       if (0 != wfd_client_disconnect(NULL))
                DBG(LOG_ERROR, "Disconnection Failed !!!\n");
-       }
 
        ugd->wfd_discovery_status = WIFI_DIRECT_DISCOVERY_SOCIAL_CHANNEL_START;
        discover_cb(WIFI_DIRECT_ERROR_NONE, WIFI_DIRECT_DISCOVERY_STARTED, ugd);
@@ -375,9 +369,9 @@ gboolean _wfd_cancel_connect_idle_cb(gpointer user_data)
                wfd_ug_view_init_genlist(ugd, true);
        } else {
                /* update the connecting icon */
-               for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
+               for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next)
                        ((device_type_s *)iterator->data)->conn_status = PEER_CONN_STATUS_DISCONNECTED;
-               }
+
                wfd_ug_view_init_genlist(ugd, false);
        }
 
@@ -479,7 +473,7 @@ void act_popup_language_changed(void *data, Evas_Object *obj, void *event_info)
        elm_object_domain_translatable_text_set(btn2, PACKAGE,
                        "IDS_BR_SK_OK");
 
-       switch(popup_type) {
+       switch (popup_type) {
 
        case POPUP_TYPE_HOTSPOT_OFF:
                elm_object_domain_translatable_text_set(btn1, PACKAGE,
@@ -627,7 +621,7 @@ void wfd_ug_act_popup(void *data, const char *message, int popup_type)
 
                evas_object_smart_callback_add(btn1, "clicked", _wfd_ug_act_popup_cancel_cb, (void *)ugd);
                evas_object_smart_callback_add(btn2, "clicked", _wfd_ug_act_popup_cancel_connect_ok_cb, (void *)ugd);
-       } else if (popup_type == POP_TYPE_ACCEPT_CONNECTION ) {
+       } else if (popup_type == POP_TYPE_ACCEPT_CONNECTION) {
                evas_object_smart_callback_add(btn1, "clicked",
                                pushbutton_reject_connect_cb, (void *)ugd);
                evas_object_smart_callback_add(btn2, "clicked",
@@ -710,9 +704,8 @@ static void _wfd_ug_warn_popup_cb(void *data, Evas_Object *obj, void *event_info
        evas_object_del(ugd->warn_popup);
        ugd->warn_popup = NULL;
 
-       if (ugd->rename_entry) {
+       if (ugd->rename_entry)
                elm_object_focus_set(ugd->rename_entry, EINA_TRUE);
-       }
 
        __FUNC_EXIT__;
 }
@@ -736,7 +729,7 @@ void warn_popup_language_changed(void *data, Evas_Object *obj, void *event_info)
        elm_object_domain_translatable_text_set(btn, PACKAGE,
                        "IDS_BR_SK_OK");
 
-       switch(popup_type) {
+       switch (popup_type) {
        case POPUP_TYPE_ACTIVATE_FAIL_POLICY_RESTRICTS:
                elm_object_domain_translatable_text_set(ugd->warn_popup, PACKAGE,
                                "IDS_COM_POP_SECURITY_POLICY_RESTRICTS_USE_OF_WI_FI");
index ffa6c97..24bd87d 100755 (executable)
@@ -32,11 +32,11 @@ static char special_char[30] = "'!@$%^&*()-_=+[];:,<.>/?";
 static bool is_space_str(const char *str)
 {
        while (str) {
-               if (*str != '\0' && *str != ' ') {
+               if (*str != '\0' && *str != ' ')
                        return FALSE;
-               } else if (*str == '\0') {
+               else if (*str == '\0')
                        return TRUE;
-               }
+
                str++;
        }
        return TRUE;
@@ -54,8 +54,8 @@ static void _rename_popop_entry_changed_cb(void *data, Evas_Object *obj, void *e
        WFD_RET_IF(ugd == NULL || obj == NULL, "Incorrect parameter(NULL)\n");
        WFD_RET_IF(ugd->rename_button == NULL, "ugd->rename_button(NULL)\n");
 
-       const char *entry_text  = NULL;
-       char *input_str                 = NULL;
+       const char *entry_text = NULL;
+       char *input_str = NULL;
        bool is_space_string = FALSE;
 
        entry_text = elm_entry_entry_get(obj);
@@ -113,9 +113,8 @@ int _check_device_name(const char *device_name)
        int j = 0;
        bool is_unavailable_char_found = true;
 
-       if ((device_name == NULL) || (strlen(device_name) == 0)) {
+       if ((device_name == NULL) || (strlen(device_name) == 0))
                return -1;
-       }
 
        for (i = 0; i < strlen(device_name); i++) {
                if ((device_name[i] >= '0' && device_name[i] <= '9') ||
@@ -154,9 +153,9 @@ static void _rename_popup_ok_cb(void *data, Evas_Object *obj, void *event_info)
        DBG(LOG_INFO, "New device name:[%s]\n", device_name_str);
        _check_device_name(device_name_str);
 
-       if (0 != vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, device_name_str)) {
-               DBG(LOG_ERROR, "Set vconf[%s] failed\n",VCONFKEY_SETAPPL_DEVICE_NAME_STR);
-       }
+       if (0 != vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, device_name_str))
+               DBG(LOG_ERROR, "Set vconf[%s] failed\n", VCONFKEY_SETAPPL_DEVICE_NAME_STR);
+
 #ifdef WFD_ON_OFF_GENLIST
        wfd_ug_view_refresh_glitem(ugd->item_wifi_onoff);
 #endif
@@ -195,9 +194,8 @@ static void __device_name_maxlength_reached_cb(void *data, Evas_Object *obj,
 
        int ret = notification_status_message_post(
                        D_("IDS_COM_POP_MAXIMUM_NUMBER_OF_CHARACTERS_REACHED"));
-       if (ret != NOTIFICATION_ERROR_NONE) {
+       if (ret != NOTIFICATION_ERROR_NONE)
                DBG(LOG_ERROR, "notification_status_message_post() ERROR [%d]", ret);
-       }
 
        __FUNC_EXIT__;
 }
@@ -231,9 +229,8 @@ static void _rename_entry_keydown_cb(void *data, Evas *e, Evas_Object *obj, void
                Ecore_IMF_Context *imf_context;
 
                imf_context = (Ecore_IMF_Context*)elm_entry_imf_context_get(entry);
-               if (imf_context) {
+               if (imf_context)
                        ecore_imf_context_input_panel_hide(imf_context);
-               }
 
                elm_object_focus_set(entry, EINA_FALSE);
        }
@@ -244,10 +241,9 @@ static char *__wfd_main_rename_desc_label_get(void *data, Evas_Object *obj,
 {
        __FUNC_ENTER__;
 
-       DBG(LOG_INFO,"Part = %s", part);
-       if (obj == NULL || part == NULL) {
+       DBG(LOG_INFO, "Part = %s", part);
+       if (obj == NULL || part == NULL)
                return NULL;
-       }
 
        if (!strcmp("elm.text.multiline", part)) {
                char buf[WFD_GLOBALIZATION_STR_LENGTH] = {0, };
@@ -368,7 +364,7 @@ void _gl_rename_device_sel(void *data, Evas_Object *obj, void *event_info)
 
        /* Entry genlist item */
        ugd->rename_entry_itc = elm_genlist_item_class_new();
-       if(ugd->rename_entry_itc != NULL) {
+       if (ugd->rename_entry_itc != NULL) {
                ugd->rename_entry_itc->item_style = "entry";
                ugd->rename_entry_itc->func.text_get = NULL;
                ugd->rename_entry_itc->func.content_get = __wfd_main_rename_entry_icon_get;
@@ -380,7 +376,7 @@ void _gl_rename_device_sel(void *data, Evas_Object *obj, void *event_info)
        }
 
        ugd->rename_desc_itc = elm_genlist_item_class_new();
-       if(ugd->rename_desc_itc != NULL) {
+       if (ugd->rename_desc_itc != NULL) {
                ugd->rename_desc_itc->item_style = WFD_GENLIST_MULTILINE_TEXT_STYLE;
                ugd->rename_desc_itc->func.text_get = __wfd_main_rename_desc_label_get;
                ugd->rename_desc_itc->func.content_get = NULL;
@@ -389,7 +385,7 @@ void _gl_rename_device_sel(void *data, Evas_Object *obj, void *event_info)
 
                git = elm_genlist_item_append(genlist, ugd->rename_desc_itc, NULL, NULL,
                                ELM_GENLIST_ITEM_NONE, NULL, NULL);
-               if(git != NULL)
+               if (git != NULL)
                        elm_genlist_item_select_mode_set(git,
                                                 ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        }