summaryrefslogtreecommitdiff
path: root/src/shared/conf-parser.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-09-10 14:13:56 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-09-10 14:13:56 +0900
commit3de39a1ad4ffa2279683882613077867f8182974 (patch)
treed8f3aa4dfc3a9b753c393d2136fc55d8d99b9922 /src/shared/conf-parser.c
parentc56566530b8635e19105b33bbbd6d1e9a2fa53ea (diff)
downloadsystemd-3de39a1ad4ffa2279683882613077867f8182974.tar.gz
conf-parser: use SYNTHETIC_ERRNO() at one more place
Diffstat (limited to 'src/shared/conf-parser.c')
-rw-r--r--src/shared/conf-parser.c6
1 files changed, 2 insertions, 4 deletions
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)