Fix coverity issue 1149129
[apps/native/volume-app.git] / src / bt.c
index 94ed31c..82d6acf 100644 (file)
--- a/src/bt.c
+++ b/src/bt.c
@@ -42,8 +42,8 @@ int bt_get_bt_volume(void)
        int bt_vol = 0;
 
        ret = bt_ag_get_speaker_gain(&bt_vol);
-       if (ret != BT_ERROR_NONE)
-       {
+
+       if (ret != BT_ERROR_NONE) {
                _E("bt_ag_get_speaker_gain Failed");
                return -1;
        }
@@ -61,7 +61,7 @@ void bt_init_sco(void)
                _E("volume bt register changed cb failed");
 }
 
-void bt_deinit_sco(void)
+void bt_fini_sco(void)
 {
        _D("SCO volume Deinitialize");
        if (_bt_unregister_changed_cb() != BT_ERROR_NONE)
@@ -101,8 +101,7 @@ static void _bt_volume_changed_cb(int volume, void *user_data)
                _E("bt_ag_is_sco_opened return [%d]", error);
        _D("BT state %d", bt_opened);
 
-       if (bt_opened == true && sound_type == SOUND_TYPE_CALL)
-       {
+       if (bt_opened == true && sound_type == SOUND_TYPE_CALL) {
                _bt_display_bt_volume_view(sound_type, sound, vibration, bt_opened);
                _D("BT SCO volume level is : %d", volume);
                if (VOLUME_ERROR_OK != volume_view_slider_value_set(volume))
@@ -122,15 +121,13 @@ static int _bt_register_changed_cb(void)
        int ret = 0;
 
        ret = bt_audio_initialize();
-       if (ret != BT_ERROR_NONE)
-       {
+       if (ret != BT_ERROR_NONE) {
                _E("bt audio initialize failed");
                return -1;
        }
 
        ret = bt_ag_set_speaker_gain_changed_cb(_bt_volume_changed_cb, NULL);
-       if (ret != BT_ERROR_NONE)
-       {
+       if (ret != BT_ERROR_NONE) {
                _E("register bt volume changed callback failed");
                return -1;
        }