[git commit] buildsys: fixup unifdef state in skiphash, linenum
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Tue Jan 7 18:47:31 UTC 2014
commit: http://git.uclibc.org/uClibc/commit/?id=08e9f6f368dcd3bb95c9f68e666ca1a0fb5d6df6
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
amend to fixup line-numbering in the unifdefile
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
extra/scripts/unifdef.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/extra/scripts/unifdef.c b/extra/scripts/unifdef.c
index a653553..f18bea8 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 == '#') {
More information about the uClibc-cvs
mailing list