From e0af8069c12f61e794e6d9a0ee089073e62869fe Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 18 Aug 2014 17:34:25 +0200 Subject: [PATCH] rtc: don't try to open rtcfile when not set --- rtc_linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rtc_linux.c b/rtc_linux.c index c45ae2b..0b2b0d0 100644 --- a/rtc_linux.c +++ b/rtc_linux.c @@ -438,8 +438,7 @@ read_coefs_from_file(void) tried_to_load_coefs = 1; - in = fopen(coefs_file_name, "r"); - if (in) { + if (coefs_file_name && (in = fopen(coefs_file_name, "r"))) { if (fscanf(in, "%d%ld%lf%lf", &valid_coefs_from_file, &file_ref_time,