From: OpenOCD-Gerrit <ope...@us...> - 2021-04-11 20:28:45
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 0ec9018040c2fd77807d80225b34e2fc7fb23e82 (commit) via 134d7d5a5876a53a10ecb2eeac8d193bdddcea81 (commit) from 96aaa77f72a721f058f3863f270c2ba3d8d68871 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0ec9018040c2fd77807d80225b34e2fc7fb23e82 Author: Marc Schink <de...@za...> Date: Mon Apr 5 15:40:35 2021 +0200 doc/manual/style: Fix comments The comments currently used are not rendered. Change-Id: I3fcfb6aee4dea9c4f9186a7aec70d382a1abd634 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6133 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/doc/manual/style.txt b/doc/manual/style.txt index c3fcfd782..755709fb0 100644 --- a/doc/manual/style.txt +++ b/doc/manual/style.txt @@ -114,9 +114,9 @@ pthreads require modest and predictable stack usage. - static inline functions should be preferred over macros: @code -/** do NOT define macro-like functions like this... */ +/* do NOT define macro-like functions like this... */ #define CUBE(x) ((x) * (x) * (x)) -/** instead, define the same expression using a C99 inline function */ +/* instead, define the same expression using a C99 inline function */ static inline int cube(int x) { return x * x * x; } @endcode - Functions should be declared static unless required by other modules commit 134d7d5a5876a53a10ecb2eeac8d193bdddcea81 Author: Marc Schink <de...@za...> Date: Fri Apr 2 11:17:00 2021 +0200 doc/manual/style: Do not use 'Yoda conditions' For more details, see: https://en.wikipedia.org/wiki/Yoda_conditions https://sektorvanskijlen.wordpress.com/2019/05/16/conditional-inversion-very-harmful-myth/ Change-Id: If1a8a5f1d0fd345b7cc0c7b5dee6d0d47f9d7fc2 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6132 Reviewed-by: Tarek BOCHKATI <tar...@gm...> Tested-by: jenkins Reviewed-by: Oleksij Rempel <li...@re...> Reviewed-by: Antonio Borneo <bor...@gm...> Reviewed-by: Tomas Vanek <va...@fb...> diff --git a/doc/manual/style.txt b/doc/manual/style.txt index dad3bb440..c3fcfd782 100644 --- a/doc/manual/style.txt +++ b/doc/manual/style.txt @@ -135,13 +135,13 @@ should write statements like the following: @code // separate statements should be preferred result = foo(); -if (ERROR_OK != result) +if (result != ERROR_OK) ... @endcode More directly, do @b not combine these kinds of statements: @code // Combined statements should be avoided -if (ERROR_OK != (result = foo())) +if ((result = foo()) != ERROR_OK) return result; @endcode ----------------------------------------------------------------------- Summary of changes: doc/manual/style.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |