diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index cab3442185..a651870641 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -227,7 +227,7 @@ static int execute_s2h(usec_t hibernate_delay_sec) { r = read_wakealarm(&orig_time); if (r < 0) - return log_error_errno(errno, "Failed to read time: %d", r); + return log_error_errno(r, "Failed to read time: %d", r); orig_time += hibernate_delay_sec / USEC_PER_SEC; xsprintf(time_str, "%" PRIu64, orig_time); @@ -244,7 +244,7 @@ static int execute_s2h(usec_t hibernate_delay_sec) { r = read_wakealarm(&cmp_time); if (r < 0) - return log_error_errno(errno, "Failed to read time: %d", r); + return log_error_errno(r, "Failed to read time: %d", r); /* reset RTC */ r = write_wakealarm("0");