From: Michael Olbrich Date: Fri, 6 Apr 2012 19:37:26 +0000 (+0200) Subject: watchdog: really return the actual watchdog timeout X-Git-Tag: v183~416 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=56bcbfa5f80ce6f1da5bb38e336b213be5ed0df0;p=elogind.git watchdog: really return the actual watchdog timeout In the current code setting the return argument is never reached. --- diff --git a/src/watchdog.c b/src/watchdog.c index 9625e151a..372c16f31 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) {