From 5e5b6c206993815f8bf11598825e22ca6e726517 Mon Sep 17 00:00:00 2001 From: Johanne Schock Date: Sun, 8 Mar 2020 22:37:39 +0100 Subject: [PATCH] Finetuning false positive --- tools/nxstyle.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/nxstyle.c b/tools/nxstyle.c index 9edd48fbc0..d704df384f 100644 --- a/tools/nxstyle.c +++ b/tools/nxstyle.c @@ -941,15 +941,14 @@ int main(int argc, char **argv, char **envp) ncomment++; } - if (!strncmp(&line[ii], "define", 6)) + rhcomment = n; + + if (!strncmp(&line[ii], "define", 6) + && prevrhcmt != 0 && n != prevrhcmt) { - rhcomment = n; - if (prevrhcmt != 0 && n != prevrhcmt) - { - rhcomment = prevrhcmt; - WARN("Wrong column position of comment right of code", - lineno, n); - } + rhcomment = prevrhcmt; + WARN("Wrong column position of comment right of code", + lineno, n); } } }