summaryrefslogtreecommitdiff
path: root/src/timesync/timesyncd.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-05-21 10:35:17 +0900
committerKay Sievers <kay@vrfy.org>2014-05-21 10:36:02 +0900
commita6cb8f870d68654a4297b8cb859068bca8e0f44c (patch)
tree425877e545025a55339331423d6ceb75cf1631f7 /src/timesync/timesyncd.c
parenta57a27b2effe92f749a565df4f1276376b2d6dbc (diff)
timesyncd: use STR_IN_SET()
Diffstat (limited to 'src/timesync/timesyncd.c')
-rw-r--r--src/timesync/timesyncd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index b13db1a3ec..54da88b7ad 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -1146,10 +1146,10 @@ static bool network_is_online(void) {
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,