From 4d4fc10d57852cd1f60a7924d7a2405b67f003bb Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 10 Feb 2025 10:42:26 +0100 Subject: [PATCH] plugins: rtc: follow-up to bc8118d In save() RTC, ensure the RTC_FILE option is actually enabled. Signed-off-by: Joachim Wiberg --- plugins/rtc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/rtc.c b/plugins/rtc.c index 96203a0a..85b2789a 100644 --- a/plugins/rtc.c +++ b/plugins/rtc.c @@ -139,6 +139,9 @@ static void file_save(void *arg) int rc = 0; FILE *fp; + if (!rtc_file) + return; + fp = fopen(rtc_file, "w"); if (!fp) { logit(LOG_WARNING, "Failed saving system clock to %s, code %d: %s",