summaryrefslogtreecommitdiff
path: root/src/shared/watchdog.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/shared/watchdog.c
parentcf347234ae78630dd4aad8907f027965e7fb9040 (diff)
time-util: add and use USEC/NSEC_INFINIY
Diffstat (limited to 'src/shared/watchdog.c')
-rw-r--r--src/shared/watchdog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c
index ba9ad9be97..7d188d98e8 100644
--- a/src/shared/watchdog.c
+++ b/src/shared/watchdog.c
@@ -29,7 +29,7 @@
#include "log.h"
static int watchdog_fd = -1;
-static usec_t watchdog_timeout = (usec_t) -1;
+static usec_t watchdog_timeout = USEC_INFINITY;
static int update_timeout(void) {
int r;
@@ -37,7 +37,7 @@ static int update_timeout(void) {
if (watchdog_fd < 0)
return 0;
- if (watchdog_timeout == (usec_t) -1)
+ if (watchdog_timeout == USEC_INFINITY)
return 0;
else if (watchdog_timeout == 0) {
int flags;
@@ -104,7 +104,7 @@ int watchdog_set_timeout(usec_t *usec) {
/* If we didn't open the watchdog yet and didn't get any
* explicit timeout value set, don't do anything */
- if (watchdog_fd < 0 && watchdog_timeout == (usec_t) -1)
+ if (watchdog_fd < 0 && watchdog_timeout == USEC_INFINITY)
return 0;
if (watchdog_fd < 0)