From: Ayush Garg Date: Fri, 15 Sep 2023 01:21:44 +0000 (+0530) Subject: Fix Coverty issue X-Git-Tag: accepted/tizen/unified/20230918.063833^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F298893%2F1;p=platform%2Fcore%2Fapi%2Fbluetooth.git Fix Coverty issue This patch fixes the PHY validation logic Change-Id: I685c7ba5fd070826c8198c9e2cc6ae585615a7af Signed-off-by: Ayush Garg --- 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)