This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 8981413 Don't check position of comments right of code when separated
by preprocessor line without comment.
8981413 is described below
commit 898141300c11bf06bc7a653b8651a744527a1e60
Author: Johannes Schock <[email protected]>
AuthorDate: Thu Mar 19 15:00:42 2020 +0100
Don't check position of comments right of code when separated by
preprocessor line without comment.
---
tools/nxstyle.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/nxstyle.c b/tools/nxstyle.c
index bcd7d6d..5c12d55 100644
--- a/tools/nxstyle.c
+++ b/tools/nxstyle.c
@@ -1014,7 +1014,12 @@ int main(int argc, char **argv, char **envp)
/* Propagate rhcomment over preprocessor lines Issue #120 */
- rhcomment = prevrhcmt;
+ if (prevrhcmt != 0)
+ {
+ /* Don't check position */
+
+ rhcomment = -1;
+ }
lptr = strstr(line, "/*");
if (lptr != NULL)