rtc: don't try to open rtcfile when not set

This commit is contained in:
Miroslav Lichvar 2014-08-18 17:34:25 +02:00
parent 696b05d6e6
commit e0af8069c1

View file

@ -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,