]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: log & return in a single statement
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 25 Dec 2023 11:57:22 +0000 (12:57 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 25 Dec 2023 17:26:59 +0000 (18:26 +0100)
src/nspawn/nspawn-oci.c

index 8f1ac7ccaddfae49d9b358da8b8be30b3482ff3a..7b73315376fff8e86a60a37f3f469333a988f1b8 100644 (file)
@@ -1837,10 +1837,8 @@ static int oci_seccomp_syscalls(const char *name, JsonVariant *v, JsonDispatchFl
                 if (r < 0)
                         return r;
 
-                if (strv_isempty(rule.names)) {
-                        json_log(e, flags, 0, "System call name list is empty.");
-                        return -EINVAL;
-                }
+                if (strv_isempty(rule.names))
+                        return json_log(e, flags, SYNTHETIC_ERRNO(EINVAL), "System call name list is empty.");
 
                 STRV_FOREACH(i, rule.names) {
                         int nr;