Skip to content

Commit a0ed7dc

Browse files
committed
Improve comment skipping in fmtscan
Change-Id: If1eed0e2c6d67a508bbf8fee1a67121f2c40ed02
1 parent dcd45e9 commit a0ed7dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/fmtscan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,10 +668,10 @@ static get_char_t skip_inline_asm(parser_t *p, bool underscore)
668668
}
669669
if (ch == '/') {
670670
get_char_t ret = skip_comments(p);
671-
if (LIKELY(ret == PARSER_COMMENT_FOUND))
672-
continue;
673671
if (UNLIKELY(ret == PARSER_EOF))
674672
return ret;
673+
/* Continue whether a comment is found or not. */
674+
continue;
675675
}
676676
if (UNLIKELY(ch == PARSER_EOF))
677677
return ch;

0 commit comments

Comments
 (0)