Fix the coding style errors 26/102926/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 09:07:18 +0000 (18:07 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 23:56:00 +0000 (08:56 +0900)
Change-Id: I750c427c96b143811b848a02edfb7fc9f2778fd2
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bt-syspopup-m.c
src/bt-syspopup-w.c

index 714f06c..0e3f244 100644 (file)
@@ -158,11 +158,10 @@ static void __bt_main_win_rot_changed_cb(void *data, Evas_Object *obj,
        int changed_ang = elm_win_rotation_get(obj);
        BT_INFO("New angle: %d, old angle: %d", changed_ang,
                                ad->rotation);
-       if (changed_ang == ad->rotation) {
+       if (changed_ang == ad->rotation)
                return;
-       } else {
+       else
                ad->rotation = changed_ang;
-       }
 
        BT_INFO("Rotation: %d", ad->rotation);
 
@@ -213,9 +212,9 @@ static void __bluetooth_player_free_job_cb(void *data)
                        player_stop(sound_player);
                        player_unprepare(sound_player);
                }
-               if (state == PLAYER_STATE_READY) {
+
+               if (state == PLAYER_STATE_READY)
                        player_unprepare(sound_player);
-               }
        }
        player_destroy(sound_player);
 
@@ -268,8 +267,8 @@ __bluetooth_player_completed_cb(void *user_data)
 
 static void
 __bluetooth_sound_stream_focus_state_changed_cb(sound_stream_info_h stream_info, sound_stream_focus_mask_e focus_mask,
-                                    sound_stream_focus_state_e focus_state, sound_stream_focus_change_reason_e reason,
-                                    int sound_behavior, const char *extra_info, void *user_data)
+                                       sound_stream_focus_state_e focus_state, sound_stream_focus_change_reason_e reason,
+                                       int sound_behavior, const char *extra_info, void *user_data)
 {
        retm_if(user_data == NULL, "invalid parameter");
        struct bt_popup_appdata *ad = user_data;
@@ -340,9 +339,8 @@ static int __bluetooth_notify_event(struct bt_popup_appdata *ad)
 
        if (*stream_info != NULL) {
                sndRet = sound_manager_destroy_stream_information(*stream_info);
-               if (sndRet != SOUND_MANAGER_ERROR_NONE) {
+               if (sndRet != SOUND_MANAGER_ERROR_NONE)
                        BT_ERR("sound_manager_destroy_stream_information() get failed : %x", ret);
-               }
        }
 
        sndRet = sound_manager_create_stream_information(SOUND_STREAM_TYPE_NOTIFICATION, __bluetooth_sound_stream_focus_state_changed_cb, (void*)(&ad->player), stream_info);
@@ -1248,9 +1246,8 @@ static void __bluetooth_draw_popup(struct bt_popup_appdata *ad,
 #ifdef TIZEN_REDWOOD
        elm_object_style_set(ad->popup, "transparent");
 #endif
-       if (title != NULL) {
+       if (title != NULL)
                elm_object_part_text_set(ad->popup, "title,text", title);
-       }
 
        if (text != NULL) {
                char *markup_text = NULL;
@@ -1408,11 +1405,12 @@ static void __bluetooth_pin_check_clicked_cb(void *data, Evas_Object *obj, void
        Eina_Bool state = elm_check_state_get(obj);
 
        BT_INFO("Check %d", state);
-       if (state) {
+
+       if (state)
                elm_entry_password_set((Evas_Object *)data, EINA_FALSE);
-       } else {
+       else
                elm_entry_password_set((Evas_Object *)data, EINA_TRUE);
-       }
+
        elm_entry_cursor_end_set((Evas_Object *)data);
 
        FN_END;
@@ -1439,9 +1437,8 @@ static void __bluetooth_pswd_check_box_sel(void *data, Evas_Object *obj, void *e
 
        elm_check_state_set(ck, !state);
 
-       if (ad->entry) {
+       if (ad->entry)
                __bluetooth_pin_check_clicked_cb(ad->entry, ck, NULL);
-       }
 
        FN_END;
 }
@@ -1790,9 +1787,8 @@ static void __bluetooth_draw_access_request_popup(struct bt_popup_appdata *ad,
        /*set window level to HIGH*/
 //     __bluetooth_set_win_level(ad->popup);
 
-       if (title != NULL) {
+       if (title != NULL)
                elm_object_part_text_set(ad->popup, "title,text", title);
-       }
 
        /* layout */
        layout = elm_layout_add(ad->popup);
@@ -2448,9 +2444,8 @@ static void __bluetooth_set_win_level(Evas_Object *parent)
                BT_DBG("Setting window type");
                ecore_x_netwm_window_type_set(xwin,
                                ECORE_X_WINDOW_TYPE_NOTIFICATION);
-               if (vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &lock_state) != 0) {
+               if (vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &lock_state) != 0)
                        BT_ERR("Fail to get the lock_state value");
-               }
 
                /*
                Issue: Pairing request pop appears in the Lock screen when DUT is locked
@@ -2582,9 +2577,9 @@ static bool __bluetooth_create(void *data)
                        __bluetooth_vconf_change_cb, ad);
        if (ret != 0)
                BT_ERR("vconf_notify_key_changed fail!");
-       if (bt_initialize() != BT_ERROR_NONE) {
+
+       if (bt_initialize() != BT_ERROR_NONE)
                BT_ERR("bt_initialize is failed");
-       }
 
        return true;
 }
@@ -2593,9 +2588,9 @@ static void __bluetooth_terminate(void *data)
 {
        struct bt_popup_appdata *ad = data;
 
-       if (bt_deinitialize() != BT_ERROR_NONE) {
+       if (bt_deinitialize() != BT_ERROR_NONE)
                BT_ERR("bt_deinitialize is failed");
-       }
+
        __bluetooth_ime_hide();
 
        if (ad->conn) {
@@ -2746,10 +2741,11 @@ EXPORT int main(int argc, char *argv[])
        callback.app_control = __bluetooth_reset;
 
        BT_DBG("ui_app_main() is called.");
+
        int ret = ui_app_main(argc, argv, &callback, &ad);
-       if (ret != APP_ERROR_NONE) {
+
+       if (ret != APP_ERROR_NONE)
                BT_ERR("ui_app_main() is failed. err = %d", ret);
-       }
 
        BT_DBG("End bt-syspopup main()");
        return ret;
index 57315bb..f6c95af 100644 (file)
@@ -629,11 +629,10 @@ static void __bluetooth_authorization_request_cb(void *data,
                enable = elm_check_state_get(ad->popup_check);
 
        style = elm_object_style_get(obj);
-       if (!g_strcmp0(style, "popup/circle/right")) {
+       if (!g_strcmp0(style, "popup/circle/right"))
                reply_val = enable ? BT_AGENT_ACCEPT_ALWAYS : BT_AGENT_ACCEPT;
-       } else {
+       else
                reply_val = BT_AGENT_CANCEL;
-       }
 
        g_dbus_proxy_call(ad->agent_proxy,
                        "ReplyAuthorize",
@@ -752,11 +751,10 @@ static void __bluetooth_draw_auth_popup(struct bt_popup_appdata *ad,
        elm_object_focus_set(ad->popup, EINA_TRUE);
 
        ao = elm_access_object_register(ad->popup, ad->win_main);
-       if (ao != NULL) {
+       if (ao != NULL)
                elm_access_info_set(ao, ELM_ACCESS_INFO, txt);
-       } else {
+       else
                BT_ERR("elm_access_object_register error!");
-       }
 
        if (txt)
                free(txt);
@@ -844,11 +842,10 @@ static void __bluetooth_draw_reset_popup(struct bt_popup_appdata *ad,
        elm_object_focus_set(ad->popup, EINA_TRUE);
 
        ao = elm_access_object_register(ad->popup, ad->win_main);
-       if (ao != NULL) {
+       if (ao != NULL)
                elm_access_info_set(ao, ELM_ACCESS_INFO, msg);
-       } else {
+       else
                BT_ERR("elm_access_object_register error!");
-       }
 
        if (txt != NULL)
                free(txt);
@@ -1042,9 +1039,10 @@ static void __bluetooth_editfield_del_cb(void *data, Evas *e,
        Evas_Object *editfield = data;
        Ecore_IMF_Context *imf_context =
                (Ecore_IMF_Context *)elm_entry_imf_context_get(editfield);
-       if (imf_context) {
+
+       if (imf_context)
                ecore_imf_context_input_panel_event_callback_clear(imf_context);
-       }
+
        FN_END;
 }
 
@@ -1323,7 +1321,7 @@ static char *__bluetooth_gl_pairing_description_label_get(void *data, Evas_Objec
        char *dev_name = (char *)data;
        char temp[100] = {'\0',};
        char *stms_str = NULL;
-       
+
        if (!strcmp(part, "elm.text")) {
                stms_str = BT_STR_ENTER_PIN_TO_PAIR_WITH_PS;
                snprintf(temp, sizeof(temp) - 1, stms_str, dev_name);
@@ -1970,9 +1968,8 @@ static bool __bluetooth_create(void *data)
        __bluetooth_set_color_table(ad);
 
        __bluetooth_session_init(ad);
-       if (bt_initialize() != BT_ERROR_NONE) {
+       if (bt_initialize() != BT_ERROR_NONE)
                BT_ERR("bt_initialize is failed");
-       }
 
        return true;
 }
@@ -1983,9 +1980,9 @@ static void __bluetooth_terminate(void *data)
 
        struct bt_popup_appdata *ad = data;
 
-       if (bt_deinitialize() != BT_ERROR_NONE) {
+       if (bt_deinitialize() != BT_ERROR_NONE)
                BT_ERR("bt_deinitialize is failed");
-       }
+
        __bluetooth_ime_hide();
 
        if (ad->conn) {