diff --git a/tools/nxstyle.c b/tools/nxstyle.c index 0ba30e5db2344..30947c12eaac0 100644 --- a/tools/nxstyle.c +++ b/tools/nxstyle.c @@ -3114,10 +3114,10 @@ int main(int argc, char **argv, char **envp) if (m > 1 && isspace((int)line[m - 1]) && line[m - 1] != '\n' && line[m - 1] != '\r') { - /* Report warning on if statement only is pnest is 0 * This takes into consideration the multiline if statement. */ + if (bif == true && pnest == 0) { WARN("If statement followed by garbage", lineno, n);