From 3de39a1ad4ffa2279683882613077867f8182974 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 10 Sep 2020 14:13:56 +0900 Subject: conf-parser: use SYNTHETIC_ERRNO() at one more place --- src/shared/conf-parser.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 0fec79f3d7..f4ef7269a8 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) -- cgit v1.2.1