summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-07-29 12:23:31 +0200
committerKay Sievers <kay@vrfy.org>2014-07-29 13:20:20 +0200
commit3a43da2832dc5360a638d043f469a6dcbe025582 (patch)
treee3b60e840bb087c1af7f458676e3ab6bf04ea49e /src/systemctl/systemctl.c
parentcf347234ae78630dd4aad8907f027965e7fb9040 (diff)
time-util: add and use USEC/NSEC_INFINIY
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 599d590747..4699a670f7 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1142,7 +1142,7 @@ static usec_t calc_next_elapse(dual_timestamp *nw, dual_timestamp *next) {
assert(nw);
assert(next);
- if (next->monotonic != (usec_t) -1 && next->monotonic > 0) {
+ if (next->monotonic != USEC_INFINITY && next->monotonic > 0) {
usec_t converted;
if (next->monotonic > nw->monotonic)
@@ -1150,7 +1150,7 @@ static usec_t calc_next_elapse(dual_timestamp *nw, dual_timestamp *next) {
else
converted = nw->realtime - (nw->monotonic - next->monotonic);
- if (next->realtime != (usec_t) -1 && next->realtime > 0)
+ if (next->realtime != USEC_INFINITY && next->realtime > 0)
next_elapse = MIN(converted, next->realtime);
else
next_elapse = converted;