From d8b9dacaf93397405e2431633d88baf625a458d5 Mon Sep 17 00:00:00 2001 From: Daniel Wagenknecht Date: Wed, 16 Sep 2026 17:46:57 +0200 Subject: [PATCH] timedate: use SymlinkFlags enum members for flags The flags to pass to symlinkat_atomic_full are defined in the SymlinkFlags enum type. The previous code passed the result of a boolean check operation directly instead of using flags. Be explicit about the value to pass instead of relying on true corresponding to the enum value for the SYMLINK_MAKE_RELATIVE flag. Signed-off-by: Daniel Wagenknecht --- src/timedate/timedated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index e57471f216..e9c0c56d3a 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -312,7 +312,7 @@ static int context_write_data_timezone(Context *c) { } return symlinkat_atomic_full(source, AT_FDCWD, etc_localtime(), - !secure_getenv("SYSTEMD_ETC_LOCALTIME")); + !secure_getenv("SYSTEMD_ETC_LOCALTIME") ? SYMLINK_MAKE_RELATIVE : 0); } static const char* etc_adjtime(void) {