Skip to content

Commit d5b8439

Browse files
removed redundant check
we already checked the current encryption and it is encrypted
1 parent 179ad16 commit d5b8439

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,7 @@ ble_error_t GenericSecurityManager::setLinkEncryption(
383383

384384
if (encryption == link_encryption_t::NOT_ENCRYPTED) {
385385

386-
if (cb->encrypted) {
387-
return _pal.disable_encryption(connection);
388-
}
386+
return _pal.disable_encryption(connection);
389387

390388
} else if (encryption == link_encryption_t::ENCRYPTED) {
391389

0 commit comments

Comments
 (0)