From: Yu Watanabe Date: Thu, 10 Sep 2020 05:13:56 +0000 (+0900) Subject: conf-parser: use SYNTHETIC_ERRNO() at one more place X-Git-Tag: v247-rc1~262^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3de39a1ad4ffa2279683882613077867f8182974;p=thirdparty%2Fsystemd.git conf-parser: use SYNTHETIC_ERRNO() at one more place --- diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 0fec79f3d79..f4ef7269a8e 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -183,10 +183,8 @@ static int parse_line( k = strlen(l); assert(k > 0); - if (l[k-1] != ']') { - log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid section header '%s'", l); - return -EBADMSG; - } + if (l[k-1] != ']') + return log_syntax(unit, LOG_ERR, filename, line, SYNTHETIC_ERRNO(EBADMSG), "Invalid section header '%s'", l); n = strndup(l+1, k-2); if (!n)