fix mistaken code formatting

I wanted to use the idiom
```c
#if GUARD
if (condition) {
    alternate code
} else
#else
{
    common default code
}
```
idiom, in which the common default code is conditioned both on a
compile-time check and a run-time check. However, I got it wrong
and uncrustify chipped in, adding extra brackets around a following
piece of code and re-indenting it.
This commit is contained in:
Jeff Epler 2022-12-08 14:14:48 -06:00
parent 19ad1d5f53
commit 170918995c
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -107,18 +107,16 @@ void common_hal_bleio_adapter_set_enabled(bleio_adapter_obj_t *self, bool enable
if (result == ENVIRON_OK) {
ble_svc_gap_device_name_set(ble_name);
} else
#else
#endif
{
ble_svc_gap_device_name_set("CIRCUITPY");
}
#endif
{// Clear all of the internal connection objects.
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
bleio_connection_internal_t *connection = &bleio_connections[i];
// Reset connection.
connection->conn_handle = BLEIO_HANDLE_INVALID;
}
// Clear all of the internal connection objects.
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
bleio_connection_internal_t *connection = &bleio_connections[i];
// Reset connection.
connection->conn_handle = BLEIO_HANDLE_INVALID;
}
cp_task = xTaskGetCurrentTaskHandle();