Skip to content

Commit 973d006

Browse files
cxw42tleb
authored andcommitted
find-file-doc-comments.pl: don't look for a doc comment before the file starts
Related to #232
1 parent f926741 commit 973d006

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

find-file-doc-comments.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ sub main {
105105
# back to it manually. Move to the first line that might be a doc comment.
106106
--$lineno;
107107

108+
# If we ran off the beginning of the file, there's no doc comment.
109+
next if $lineno <= 0;
110+
108111
# TODO make sure we're not still in the definition.
109112
# E.g., memblock.h:for_each_mem_range(). The defintion is reported
110113
# on the second line of the #define, not the first line.

0 commit comments

Comments
 (0)