Fix tizen coding style errors and warnings
[platform/core/connectivity/bluetooth-frwk.git] / bt-otp / bt-otpserver.c
index 4de7302..7693b12 100644 (file)
@@ -210,9 +210,8 @@ void _bt_otp_exit(void)
        if (ret != BLUETOOTH_ERROR_NONE)
                BT_ERR("Failed to stop ADV %d", ret);
 
-       if (main_loop != NULL) {
+       if (main_loop != NULL)
                g_main_loop_quit(main_loop);
-       }
 }
 
 static void _bt_otp_set_char_value(const char *obj_path,
@@ -700,9 +699,8 @@ static void _bt_otp_method(GDBusConnection *connection,
                        goto fail;
                }
 
-               while ((filename = g_dir_read_name(dir))) {
+               while ((filename = g_dir_read_name(dir)))
                        list = g_slist_append(list, (gpointer) filename);
-               }
 
                g_dir_close(dir);
 
@@ -1789,9 +1787,8 @@ int _bt_otp_read_cb(const char *obj_path, char **value, int *len, uint16_t offse
        }
 
        if (g_strcmp0(obj_path, otp_feature_obj_path)) {
-               if (!selected_object) {
+               if (!selected_object)
                        return BLUETOOTH_OTP_ERROR_OBJECT_NOT_SELECTED;
-               }
        }
 
        info = otp_get_char_value(obj_path);
@@ -1948,13 +1945,11 @@ void _bt_otp_gatt_char_property_changed_event(GVariant *msg,
 
                                        /* Send indication for CPs */
                                        if (!g_strcmp0(char_path, otp_oacp_obj_path)) {
-                                               if (OACP_indicate) {
+                                               if (OACP_indicate)
                                                        _bt_otp_send_indication(char_path, &info, &addr_hex);
-                                               }
                                        } else if (!g_strcmp0(char_path, otp_olcp_obj_path)) {
-                                               if (OLCP_indicate) {
+                                               if (OLCP_indicate)
                                                        _bt_otp_send_indication(char_path, &info, &addr_hex);
-                                               }
                                        }
                                } else {
                                        BT_ERR("Array Len 0");
@@ -2000,11 +1995,10 @@ void _bt_otp_gatt_char_property_changed_event(GVariant *msg,
                                indicate ? "StartNotify" : "StopNotify");
                        BT_INFO("Type '%s'\n", g_variant_get_type_string(var));
 
-                       if (!g_strcmp0(char_path, otp_oacp_obj_path)) {
+                       if (!g_strcmp0(char_path, otp_oacp_obj_path))
                                OACP_indicate = indicate;
-                       } else if (!g_strcmp0(char_path, otp_olcp_obj_path)) {
+                       else if (!g_strcmp0(char_path, otp_olcp_obj_path))
                                OLCP_indicate = indicate;
-                       }
                }
        }
        return;
@@ -2048,9 +2042,8 @@ void _bt_otp_adapter_event_filter(GDBusConnection *connection,
        BT_INFO("Interface %s, Signal %s", interface_name, signal_name);
 
        if (g_strcmp0(interface_name, BT_OTP_INTERFACE_NAME) == 0) {
-               if (strcasecmp(signal_name, BLE_DISABLED) == 0) {
+               if (strcasecmp(signal_name, BLE_DISABLED) == 0)
                        _bt_otp_exit();
-               }
        }
 }
 
@@ -2232,9 +2225,8 @@ int main(void)
 
        BT_DBG("g_main_loop_quit called!");
 
-       if (main_loop != NULL) {
+       if (main_loop != NULL)
                g_main_loop_unref(main_loop);
-       }
 
        return 0;
 }