diff options
author | Ayush Garg <ayush.garg@samsung.com> | 2023-09-15 06:51:44 +0530 |
---|---|---|
committer | Ayush Garg <ayush.garg@samsung.com> | 2023-09-15 06:51:44 +0530 |
commit | 3176e6f6dec29a4753b713592a01ccddbfb828d8 (patch) | |
tree | d2831074e5fea5c3f92df29b9328cef2409d16e6 | |
parent | 9ac17c866a5d03211d8bc62dcd319fdab29fa33a (diff) | |
download | bluetooth-3176e6f6dec29a4753b713592a01ccddbfb828d8.tar.gz bluetooth-3176e6f6dec29a4753b713592a01ccddbfb828d8.tar.bz2 bluetooth-3176e6f6dec29a4753b713592a01ccddbfb828d8.zip |
Fix Coverty issuetizen_8.0_m2_releaseaccepted/tizen/unified/20230918.063833accepted/tizen/8.0/unified/20231005.092628
This patch fixes the PHY validation logic
Change-Id: I685c7ba5fd070826c8198c9e2cc6ae585615a7af
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
-rw-r--r-- | src/bluetooth-gatt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c index ce0acd1..d207708 100644 --- a/src/bluetooth-gatt.c +++ b/src/bluetooth-gatt.c @@ -3652,14 +3652,14 @@ static bool __bt_gatt_is_phy_options_valid(int phy_options) static bool __bt_gatt_is_phy_valid(int phy) { - if (phy | BT_LE_2M_PHY_MASK) { + if (phy & BT_LE_2M_PHY_MASK) { bool is_2m_phy_supported = false; int ret = bt_adapter_le_is_2m_phy_supported(&is_2m_phy_supported); if (!ret || !is_2m_phy_supported) return false; } - if (phy | BT_LE_CODED_PHY_MASK) { + if (phy & BT_LE_CODED_PHY_MASK) { bool is_coded_phy_supported = false; int ret = bt_adapter_le_is_coded_phy_supported(&is_coded_phy_supported); if (!ret || !is_coded_phy_supported) |