From: Wootak Jung Date: Mon, 27 Jul 2020 00:54:54 +0000 (+0900) Subject: Fix i586 build error X-Git-Tag: submit/tizen/20200727.225618~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F239453%2F2;p=platform%2Fcore%2Fapi%2Fbluetooth.git Fix i586 build error 0xff is set 0xffffffff in i586 Change-Id: Ideaf7af5c54d0fbd789d766961d2da342641168a Signed-off-by: Wootak Jung --- diff --git a/src/bluetooth-adapter.c b/src/bluetooth-adapter.c index 8e66609..618473e 100644 --- a/src/bluetooth-adapter.c +++ b/src/bluetooth-adapter.c @@ -3427,7 +3427,7 @@ int bt_adapter_le_get_scan_result_manufacturer_data(const bt_adapter_le_device_s field_len = 0; while (remain_len > 0) { field_len = remain_data[0]; - if (remain_data[1] == BT_ADAPTER_LE_ADVERTISING_DATA_MANUFACTURER_SPECIFIC_DATA) { + if ((uint64_t)(remain_data[1] & 0xff) == BT_ADAPTER_LE_ADVERTISING_DATA_MANUFACTURER_SPECIFIC_DATA) { if (field_len < 3 || (remain_len - 1 < field_len)) { /* Manufacturer Specific Data (2 or more octets) - The first 2 octets contain the Company Identifier diff --git a/tests/unittest/utc_bluetooth_gatt_negative.c b/tests/unittest/utc_bluetooth_gatt_negative.c index e2892ae..63d3560 100644 --- a/tests/unittest/utc_bluetooth_gatt_negative.c +++ b/tests/unittest/utc_bluetooth_gatt_negative.c @@ -525,16 +525,15 @@ static bool __bt_gatt_client_foreach_chr_cb(int total, int index, bt_gatt_h chr_ */ int utc_bluetooth_bt_gatt_service_foreach_characteristics_n(void) { - int test_id = 0; bt_gatt_h service = NULL; if (gatt_client_supported || gatt_server_supported) { assert_eq(startup_flag, BT_ERROR_NONE); - ret = bt_gatt_service_foreach_characteristics(service, __bt_gatt_client_foreach_chr_cb, (void *)test_id); + ret = bt_gatt_service_foreach_characteristics(service, __bt_gatt_client_foreach_chr_cb, NULL); assert_eq(ret, BT_ERROR_INVALID_PARAMETER); } else { - ret = bt_gatt_service_foreach_characteristics(service, __bt_gatt_client_foreach_chr_cb, (void *)test_id); + ret = bt_gatt_service_foreach_characteristics(service, __bt_gatt_client_foreach_chr_cb, NULL); assert_eq(ret, BT_ERROR_NOT_SUPPORTED); }