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/3ceb8ae1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/3ceb8ae1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/3ceb8ae1 Branch: refs/heads/sterly_refactor Commit: 3ceb8ae172ce67204e93830c02e92d4631509eb1 Parents: ce2e596 Author: Christopher Collins <[email protected]> Authored: Mon Aug 1 14:06:59 2016 -0700 Committer: Sterling Hughes <[email protected]> Committed: Wed Aug 3 14:57:50 2016 -0700 ---------------------------------------------------------------------- CODING_STANDARDS.md | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3ceb8ae1/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.
