conf-parser: fix line number in error message

Fixes #14929.
This commit is contained in:
Yu Watanabe 2020-02-28 02:37:11 +09:00
parent 79ac19ae61
commit 68c1ac1568

View file

@ -334,6 +334,8 @@ int config_parse(const char *unit,
return r;
}
line++;
l = skip_leading_chars(buf, WHITESPACE);
if (*l != '\0' && strchr(COMMENTS, *l))
continue;
@ -390,7 +392,7 @@ int config_parse(const char *unit,
r = parse_line(unit,
filename,
++line,
line,
sections,
lookup,
table,