ct = now(CLOCK_REALTIME);
if (nt > ct) {
struct timespec ts;
- log_info("System clock time unset or jumed backwards, restoring.");
+ log_info("System clock time unset or jumped backwards, restoring.");
if (clock_settime(CLOCK_REALTIME, timespec_store(&ts, nt)) < 0)
log_error("Failed to restore system clock: %m");
int r;
r = sd_network_get_operational_state(&state);
- if (r >= 0 && (streq("routable", state) || streq("degraded", state)))
+ if (r >= 0 && STR_IN_SET(state, "routable", "degraded"))
return true;
- else
- return false;
+
+ return false;
}
static int manager_network_event_handler(sd_event_source *s, int fd, uint32_t revents,