From: Mike Yuan Date: Wed, 5 Mar 2025 17:22:19 +0000 (+0100) Subject: core/main: assign mac_init() retval to r X-Git-Tag: v258-rc1~1139^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=550f4718bc6b11d8801af3b7eb888aa4ba0fdc90;p=thirdparty%2Fsystemd.git core/main: assign mac_init() retval to r If it fails, we'd submit the errno to supervisor via sd_notify() later. --- diff --git a/src/core/main.c b/src/core/main.c index 15e29bbcbab..6b9b9eb6915 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -3136,7 +3136,8 @@ int main(int argc, char *argv[]) { goto finish; } - if (mac_init() < 0) { + r = mac_init(); + if (r < 0) { error_message = "Failed to initialize MAC support"; goto finish; } @@ -3212,7 +3213,8 @@ int main(int argc, char *argv[]) { /* clear the kernel timestamp, because we are not PID 1 */ kernel_timestamp = DUAL_TIMESTAMP_NULL; - if (mac_init() < 0) { + r = mac_init(); + if (r < 0) { error_message = "Failed to initialize MAC support"; goto finish; }