summaryrefslogtreecommitdiff
path: root/src/watchdog.c
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-04-06 21:37:26 +0200
committerLennart Poettering <lennart@poettering.net>2012-04-10 22:32:30 +0200
commit56bcbfa5f80ce6f1da5bb38e336b213be5ed0df0 (patch)
treeff8becd011f8595effe0087765483cd8883e33ed /src/watchdog.c
parent771f19c06a9dbe19e4c3e532d901734f4b3b3a2b (diff)
watchdog: really return the actual watchdog timeout
In the current code setting the return argument is never reached.
Diffstat (limited to 'src/watchdog.c')
-rw-r--r--src/watchdog.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/watchdog.c b/src/watchdog.c
index 9625e151af..372c16f317 100644
--- a/src/watchdog.c
+++ b/src/watchdog.c
@@ -98,6 +98,7 @@ static int open_watchdog(void) {
}
int watchdog_set_timeout(usec_t *usec) {
+ int r;
watchdog_timeout = *usec;
@@ -107,11 +108,13 @@ int watchdog_set_timeout(usec_t *usec) {
return 0;
if (watchdog_fd < 0)
- return open_watchdog();
+ r = open_watchdog();
else
- return update_timeout();
+ r = update_timeout();
*usec = watchdog_timeout;
+
+ return r;
}
int watchdog_ping(void) {