BLE lls - Move variable defn. to top of fn.

Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/ce2e596d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ce2e596d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ce2e596d

Branch: refs/heads/sterly_refactor
Commit: ce2e596d564758ed0198d0175aeba8d3b84233ce
Parents: d6343b5
Author: Christopher Collins <[email protected]>
Authored: Mon Aug 1 14:04:42 2016 -0700
Committer: Sterling Hughes <[email protected]>
Committed: Wed Aug 3 14:57:50 2016 -0700

----------------------------------------------------------------------
 net/nimble/host/profiles/lls/src/ble_svc_lls.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ce2e596d/net/nimble/host/profiles/lls/src/ble_svc_lls.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/profiles/lls/src/ble_svc_lls.c 
b/net/nimble/host/profiles/lls/src/ble_svc_lls.c
index c4be140..a068828 100644
--- a/net/nimble/host/profiles/lls/src/ble_svc_lls.c
+++ b/net/nimble/host/profiles/lls/src/ble_svc_lls.c
@@ -178,6 +178,8 @@ int
 ble_svc_lls_init(struct ble_hs_cfg *cfg, uint8_t initial_alert_level,
                  ble_svc_lls_event_fn *cb)
 {
+    int rc;
+
     if (!cb) {
         return BLE_HS_EINVAL;
     }
@@ -185,7 +187,6 @@ ble_svc_lls_init(struct ble_hs_cfg *cfg, uint8_t 
initial_alert_level,
     ble_svc_lls_alert_level = initial_alert_level;
     cb_fn = cb;
 
-    int rc;
     rc = ble_gatts_count_cfg(ble_svc_lls_defs, cfg);
     if (rc != 0) {
         return rc;

Reply via email to