summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to 'extra')
-rw-r--r--extra/scripts/unifdef.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/extra/scripts/unifdef.c b/extra/scripts/unifdef.c
index a65355366..f18bea853 100644
--- a/extra/scripts/unifdef.c
+++ b/extra/scripts/unifdef.c
@@ -1097,12 +1097,14 @@ skiphash(void)
{
const char *cp;
- linenum++;
- if (linestate == LS_START && fgets(tline, MAXLINE, input) == NULL) {
- if (ferror(input))
- err(2, "can't read %s", filename);
- else
- return (NULL);
+ if (linestate == LS_START) {
+ linenum++;
+ if (fgets(tline, MAXLINE, input) == NULL) {
+ if (ferror(input))
+ err(2, "can't read %s", filename);
+ else
+ return (NULL);
+ }
}
cp = skipcomment(tline);
if (linestate == LS_START && *cp == '#') {