From 2860365a3c77c075f388f836575fc884df41a7cd Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Tue, 15 May 2018 12:16:51 +0100 Subject: [PATCH] BLE: Improve readibility of condition. --- .../FEATURE_BLE/source/generic/GenericSecurityManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp b/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp index 03f5450d43..8e4effaa90 100644 --- a/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp +++ b/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp @@ -448,8 +448,8 @@ ble_error_t GenericSecurityManager::setLinkEncryption( } else if (encryption == link_encryption_t::ENCRYPTED_WITH_SC_AND_MITM) { if (cb->ltk_mitm_protected && - cb->secure_connections_paired && ! - cb->encrypted + cb->secure_connections_paired && + !cb->encrypted ) { cb->encryption_requested = true; return enable_encryption(connection);