]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pid1,sysusers: drop unused SYNTHETIC_ERRNO
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Jan 2023 13:21:49 +0000 (14:21 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Jan 2023 13:30:41 +0000 (14:30 +0100)
The only function of SYNTHETIC_ERRNO is to set the return value.
If we're ignoring the return value, it shouldn't be used.

src/core/load-fragment.c
src/sysusers/sysusers.c

index 0ed2d1b31d47f043c8517b7d424df197c3719d0f..ce15758901ada2a2f09f98b98eb364b445045efd 100644 (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;
                 }
index 4a695fcfabd328fa76a8247aa35ecc50d08bd2d3..4c31f9630193d29f472c5f14d46d094d969a87d4 100644 (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);