Repository: incubator-mynewt-core Updated Branches: refs/heads/develop 88e3cb60e -> 403e89922
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/b005e150 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/b005e150 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/b005e150 Branch: refs/heads/develop Commit: b005e150ea12dd2409240e577c287466eb2ffcd0 Parents: 88e3cb6 Author: Christopher Collins <[email protected]> Authored: Mon Aug 1 14:04:42 2016 -0700 Committer: Christopher Collins <[email protected]> Committed: Mon Aug 1 14:04:42 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/b005e150/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;
