conf-parser: use SYNTHETIC_ERRNO() at one more place
This commit is contained in:
parent
c56566530b
commit
3de39a1ad4
|
@ -183,10 +183,8 @@ static int parse_line(
|
||||||
k = strlen(l);
|
k = strlen(l);
|
||||||
assert(k > 0);
|
assert(k > 0);
|
||||||
|
|
||||||
if (l[k-1] != ']') {
|
if (l[k-1] != ']')
|
||||||
log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid section header '%s'", l);
|
return log_syntax(unit, LOG_ERR, filename, line, SYNTHETIC_ERRNO(EBADMSG), "Invalid section header '%s'", l);
|
||||||
return -EBADMSG;
|
|
||||||
}
|
|
||||||
|
|
||||||
n = strndup(l+1, k-2);
|
n = strndup(l+1, k-2);
|
||||||
if (!n)
|
if (!n)
|
||||||
|
|
Loading…
Reference in a new issue