From 51481b08333383476c279cf6f034a3866700fea1 Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Fri, 1 May 2015 11:17:51 +0100 Subject: [PATCH] merge default cases within gattc_event_handler --- btle/btle_gattc.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/btle/btle_gattc.cpp b/btle/btle_gattc.cpp index 10c294a..e6a0959 100644 --- a/btle/btle_gattc.cpp +++ b/btle/btle_gattc.cpp @@ -205,15 +205,10 @@ void bleGattcEventHandler(const ble_evt_t *p_ble_evt) break; } - case BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND: { + case BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND: + default: discoveryStatus.terminateServiceDiscovery(); break; - } - - default: { - discoveryStatus.serviceDiscoveryInProgress = false; - break; - } } break; @@ -224,12 +219,9 @@ void bleGattcEventHandler(const ble_evt_t *p_ble_evt) break; } - case BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND: { - discoveryStatus.terminateCharacteristicDiscovery(); - break; - } - + case BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND: default: + discoveryStatus.terminateCharacteristicDiscovery(); break; } break;