Skip to content

Commit 4b8fb0b

Browse files
committed
Nordic BLE: Fix return value verification
1 parent b68e18c commit 4b8fb0b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF51/source/nRF5xPalSecurityManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ ble_error_t nRF5xSecurityManager::cancel_pairing(
354354
// a pairing feature exchange from a central.
355355
if (!pairing_cb) {
356356
::Gap::Role_t current_role;
357-
if (!nRF5xn::Instance().getGap().get_role(connection, current_role)) {
357+
if (nRF5xn::Instance().getGap().get_role(connection, current_role) != BLE_ERROR_NONE) {
358358
return BLE_ERROR_INVALID_PARAM;
359359
}
360360

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xPalSecurityManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ ble_error_t nRF5xSecurityManager::cancel_pairing(
331331
// a pairing feature exchange from a central.
332332
if (!pairing_cb) {
333333
::Gap::Role_t current_role;
334-
if (!nRF5xn::Instance().getGap().get_role(connection, current_role)) {
334+
if (nRF5xn::Instance().getGap().get_role(connection, current_role) != BLE_ERROR_NONE) {
335335
return BLE_ERROR_INVALID_PARAM;
336336
}
337337

0 commit comments

Comments
 (0)