From: Yu Watanabe Date: Thu, 27 Feb 2020 17:37:11 +0000 (+0900) Subject: conf-parser: fix line number in error message X-Git-Tag: v245-rc2~31^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14964%2Fhead;p=thirdparty%2Fsystemd.git conf-parser: fix line number in error message Fixes #14929. --- diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 318588cc1fd..657df0a517a 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -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,