From 17b457bb1ddc3840cb90da5fadf9c684bf7cbf86 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Mon, 1 Aug 2016 14:03:38 -0700 Subject: [PATCH] variables declared at top of function scope X-Original-Commit: ef3024f99d6b805e37b1a8e91057e4992e98b845 --- nimble/host/profiles/tps/src/ble_svc_tps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nimble/host/profiles/tps/src/ble_svc_tps.c b/nimble/host/profiles/tps/src/ble_svc_tps.c index e354eec43..fbbd0b5fd 100644 --- a/nimble/host/profiles/tps/src/ble_svc_tps.c +++ b/nimble/host/profiles/tps/src/ble_svc_tps.c @@ -58,8 +58,10 @@ static int ble_svc_tps_access(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg) { - assert(ctxt->chr == &ble_svc_tps_defs[0].characteristics[0]); int rc; + + assert(ctxt->chr == &ble_svc_tps_defs[0].characteristics[0]); + switch (ctxt->op) { case BLE_GATT_ACCESS_OP_READ_CHR: ble_hci_util_read_adv_tx_pwr(&ble_svc_tps_tx_power_level);