core/main: assign mac_init() retval to r

If it fails, we'd submit the errno to supervisor via sd_notify() later.
This commit is contained in:
Mike Yuan
2025-03-08 20:40:24 +01:00
parent eda75b2cb2
commit 550f4718bc
+4 -2
View File
@@ -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;
}