You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/08/01 21:07:37 UTC

[1/2] incubator-mynewt-core git commit: BLE lls - Move variable defn. to top of fn.

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 <cc...@apache.org>
Authored: Mon Aug 1 14:04:42 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
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;


[2/2] incubator-mynewt-core git commit: coding standards - variable defn. placement.

Posted by cc...@apache.org.
coding standards - variable defn. placement.


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/403e8992
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/403e8992
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/403e8992

Branch: refs/heads/develop
Commit: 403e8992278f77ef0096bd1d4b74eb91f8f49352
Parents: b005e15
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Aug 1 14:06:59 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Aug 1 14:06:59 2016 -0700

----------------------------------------------------------------------
 CODING_STANDARDS.md | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/403e8992/CODING_STANDARDS.md
----------------------------------------------------------------------
diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md
index 4727f1e..fc8523d 100644
--- a/CODING_STANDARDS.md
+++ b/CODING_STANDARDS.md
@@ -254,6 +254,8 @@ applications to use pointers to those structures opaquely.
 hide or alias the underlying type used (e.g. ```os_time_t```.)   Indicate
 typedefs by applying the ```_t``` marker to them.
 
+* Place all function-local variable definitions at the top of the function body, before any statements.
+
 ## Compiler Directives
 
 * Code must compile cleanly with -Wall enabled.