Fix the warning errors
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-main.c
index f2a3515..3b5adb0 100644 (file)
@@ -107,11 +107,10 @@ gboolean _bt_reliable_terminate_service(gpointer user_data)
 
        BT_INFO_C("Terminating the bt-service daemon");
 
-       if (main_loop != NULL) {
+       if (main_loop != NULL)
                g_main_loop_quit(main_loop);
-       } else {
+       else
                exit(0);
-       }
 
        return FALSE;
 }
@@ -138,13 +137,11 @@ static gboolean __bt_check_bt_service(void *data)
        if (_bt_get_enable_timer_id() == 0)
                _bt_enable_adapter();
 #else
-       if (vconf_get_int(VCONFKEY_BT_STATUS, &bt_status) < 0) {
+       if (vconf_get_int(VCONFKEY_BT_STATUS, &bt_status) < 0)
                BT_DBG("no bluetooth device info, so BT was disabled at previous session");
-       }
 
-       if (vconf_get_int(VCONFKEY_BT_LE_STATUS, &bt_le_status) < 0) {
+       if (vconf_get_int(VCONFKEY_BT_LE_STATUS, &bt_le_status) < 0)
                BT_ERR("no bluetooth le info, so BT LE was disabled at previous session");
-       }
 
        if (vconf_get_int(BT_OFF_DUE_TO_FLIGHT_MODE, &flight_mode_deactivation) != 0)
                BT_ERR("Fail to get the flight_mode_deactivation value");
@@ -257,9 +254,8 @@ int main(void)
        sigaction(SIGINT, &sa, NULL);
        sigaction(SIGTERM, &sa, NULL);
 
-       if (_bt_service_initialize() != BLUETOOTH_ERROR_NONE) {
+       if (_bt_service_initialize() != BLUETOOTH_ERROR_NONE)
                return 0;
-       }
 
        g_timeout_add(500, (GSourceFunc)__bt_check_bt_service, NULL);
 
@@ -273,9 +269,8 @@ int main(void)
        g_main_loop_run(main_loop);
        BT_DBG("g_main_loop_quit called!");
 
-       if (main_loop != NULL) {
+       if (main_loop != NULL)
                g_main_loop_unref(main_loop);
-       }
 
        if (terminated == FALSE)
                __bt_release_service();