1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

pid1,sysusers: drop unused SYNTHETIC_ERRNO

The only function of SYNTHETIC_ERRNO is to set the return value.
If we're ignoring the return value, it shouldn't be used.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-01-31 14:21:49 +01:00
parent 616c53544f
commit 5afdb4629a
2 changed files with 2 additions and 2 deletions

View File

@ -4606,7 +4606,7 @@ int config_parse_exec_directories(
if (r == -ENOMEM)
return log_oom();
if (r <= 0) {
log_syntax(unit, LOG_WARNING, filename, line, r ?: SYNTHETIC_ERRNO(EINVAL),
log_syntax(unit, LOG_WARNING, filename, line, r,
"Invalid syntax in %s=, ignoring: %s", lvalue, tuple);
return 0;
}

View File

@ -1811,7 +1811,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
if (r < 0)
return r;
if (r == 0)
log_syntax(NULL, LOG_WARNING, fname, line, SYNTHETIC_ERRNO(EUCLEAN),
log_syntax(NULL, LOG_WARNING, fname, line, 0,
"Conflict with earlier configuration for %s '%s', ignoring line.",
item_type_to_string(i->type), i->name);