From 62c2b4aac7a460e940608d143d08e9c9bd09effc Mon Sep 17 00:00:00 2001 From: Johanne Schock Date: Sun, 8 Mar 2020 13:55:46 +0100 Subject: [PATCH] nxstyle fixes fixed coloumn number of error messages PR #487 fixed lineno_min = lineno_min --- tools/nxstyle.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/nxstyle.c b/tools/nxstyle.c index 4641d9a937..f49c84fe6a 100644 --- a/tools/nxstyle.c +++ b/tools/nxstyle.c @@ -429,7 +429,7 @@ static int get_line_width(FILE *instream) if (len < min) { min = len; - lineno_min = lineno_min; + lineno_min = lineno; } } } @@ -923,14 +923,16 @@ int main(int argc, char **argv, char **envp) lptr += 2; if (*lptr == '\n') { - ERROR("C comment opening on separate line", lineno, n); + ERROR("C comment opening on separate line", + lineno, lptr - &line[0]); } else if (!isspace((int)*lptr)) { - ERROR("Missing space after opening C comment", lineno, n); + ERROR("Missing space after opening C comment", + lineno, lptr - &line[0]); } - if (strstr(line, "*/") == NULL) + if (strstr(lptr, "*/") == NULL) { /* Increment the count of nested comments */