summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2014-01-07 19:47:31 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2014-01-07 19:47:31 +0100
commit08e9f6f368dcd3bb95c9f68e666ca1a0fb5d6df6 (patch)
treeaca650600b365c8af813e025a663fdbffb5943f3 /extra
parentc71f8bc18e33da575c2f637a4dfa5e6bf120cd3c (diff)
buildsys: fixup unifdef state in skiphash, linenum
amend to fixup line-numbering in the unifdefile Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
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 == '#') {