From: Frantisek Sumsal Date: Mon, 25 Dec 2023 11:57:22 +0000 (+0100) Subject: nspawn: log & return in a single statement X-Git-Tag: v256-rc1~1384^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34e2897f5140e23cbe2844de56d0990f04325fa6;p=thirdparty%2Fsystemd.git nspawn: log & return in a single statement --- diff --git a/src/nspawn/nspawn-oci.c b/src/nspawn/nspawn-oci.c index 8f1ac7ccadd..7b73315376f 100644 --- a/src/nspawn/nspawn-oci.c +++ b/src/nspawn/nspawn-oci.c @@ -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;