mirror of
https://github.com/troglobit/finit.git
synced 2026-10-29 12:40:44 +00:00
plugins: follow-up to 13a8f56, fix missing else branch
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 file changed
+2
-3
+2
-3
@@ -170,9 +170,9 @@ static void file_save(void *arg)
|
|||||||
static void file_restore(void *arg)
|
static void file_restore(void *arg)
|
||||||
{
|
{
|
||||||
struct tm tm = { 0 };
|
struct tm tm = { 0 };
|
||||||
|
char msg[120];
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char msg[120];
|
|
||||||
|
|
||||||
if (!rtc_file) {
|
if (!rtc_file) {
|
||||||
snprintf(msg, sizeof(msg), "Resetting system clock to kernel default, %s.", rtc_timestamp);
|
snprintf(msg, sizeof(msg), "Resetting system clock to kernel default, %s.", rtc_timestamp);
|
||||||
@@ -188,12 +188,11 @@ static void file_restore(void *arg)
|
|||||||
|
|
||||||
if (fgets(buf, sizeof(buf), fp)) {
|
if (fgets(buf, sizeof(buf), fp)) {
|
||||||
chomp(buf);
|
chomp(buf);
|
||||||
strptime(buf, RTC_FMT, &tm);
|
|
||||||
if (!strptime(buf, RTC_FMT, &tm))
|
if (!strptime(buf, RTC_FMT, &tm))
|
||||||
rc = 1;
|
rc = 1;
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
} else
|
||||||
rc = 1;
|
rc = 1;
|
||||||
|
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
|||||||
Reference in new issue
Block a user