From: Frantisek Sumsal Date: Mon, 15 May 2023 18:10:05 +0000 (+0200) Subject: nspawn: fix inverted condition X-Git-Tag: v254-rc1~464^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc832965476d106fb3d5a6c9a43f5ff3166987b2;p=thirdparty%2Fsystemd.git nspawn: fix inverted condition --- diff --git a/src/nspawn/nspawn-oci.c b/src/nspawn/nspawn-oci.c index c67516f2c1d..22ac1e2ebf9 100644 --- a/src/nspawn/nspawn-oci.c +++ b/src/nspawn/nspawn-oci.c @@ -1589,7 +1589,7 @@ static int oci_sysctl(const char *name, JsonVariant *v, JsonDispatchFlags flags, assert_se(m = json_variant_string(w)); - if (sysctl_key_valid(k)) + if (!sysctl_key_valid(k)) return json_log(v, flags, SYNTHETIC_ERRNO(EINVAL), "sysctl key invalid, refusing: %s", k);