resolved the code rule warnings
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-adaptation / services / device / bt-service-core-device.c
index 41153f6..2955a8d 100644 (file)
@@ -289,7 +289,7 @@ static void __bt_device_remote_properties_callback(event_dev_properties_t *oal_d
                BT_INFO("Bonding is ongoing, try update properties");
                if (!trigger_bond_info->dev_info ||
                                (!trigger_bond_info->dev_info->name &&
-                                !incoming_bond_info->dev_info->alias) ||
+                                !trigger_bond_info->dev_info->alias) ||
                                        !trigger_bond_info->dev_info->address ||
                                                trigger_bond_info->dev_info->uuid_count == 0) {
                        BT_INFO("Complete data is not present, Assigning rem_info");
@@ -1017,6 +1017,7 @@ static void __bt_device_event_handler(int event_type, gpointer event_data)
                                BLUETOOTH_EVENT_SUPPORTED_PROFILE_TRUSTED,
                                g_variant_new("(isi)", BLUETOOTH_ERROR_NONE,
                                        address, ev->trust_val));
+               break;
        }
        case OAL_EVENT_RSSI_MONITORING_ENABLED: {
                event_dev_rssi_info_t *ev = event_data;
@@ -1996,7 +1997,7 @@ int _bt_set_passkey_notification(const char *sender, gboolean enable)
        BT_INFO("Set passkey notification(sender:%s, %s)",
                        sender, enable ? "Enable" : "Disable");
 
-       result = device_enable_gap_auth_notifications(OAL_PASSKEY_DISPLAY,enable);
+       result = device_enable_gap_auth_notifications(OAL_PASSKEY_DISPLAY, enable);
        if (OAL_STATUS_SUCCESS != result) {
                BT_ERR("device_enable_gap_auth_notifications error: [%d]", result);
                return BLUETOOTH_ERROR_INTERNAL;
@@ -2089,7 +2090,7 @@ int _bt_unset_pin_code(bluetooth_device_address_t *device_address)
 
                if (g_strcmp0(pin_info->address, address) == 0) {
                        pin_info_list = g_slist_remove(pin_info_list, pin_info);
-                       g_free(pin_info->pin_code);
+                       g_free(pin_info->address);
                        g_free(pin_info->pin_code);
                        g_free(pin_info);
                        break;