From: Mike Yuan Date: Thu, 26 Mar 2026 15:38:12 +0000 (+0100) Subject: efi-loader: shorten the code a bit X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b82e739cb5b59b1af22d848dc9562d2ed9041452;p=thirdparty%2Fsystemd.git efi-loader: shorten the code a bit --- diff --git a/src/shared/efi-loader.c b/src/shared/efi-loader.c index 20e4719bb06..73d6960297f 100644 --- a/src/shared/efi-loader.c +++ b/src/shared/efi-loader.c @@ -325,10 +325,10 @@ int efi_measured_os(int log_level) { bool b; r = proc_cmdline_get_bool("systemd.tpm2_measured_os", /* flags= */ 0, &b); + if (r > 0) + return (cached = b); if (r < 0) log_debug_errno(r, "Failed to parse systemd.tpm2_measured_os= kernel command line argument, ignoring: %m"); - else if (r > 0) - return (cached = b); /* If nothing is explicitly configured, just assume that if we booted with a measured UKI we also want a measured OS */ return (cached = efi_measured_uki(log_level));