chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
sd-daemon: explicitly filter out -1 when parsing watchdog timeout
[elogind.git]
/
src
/
libelogind
/
sd-daemon
/
sd-daemon.c
diff --git
a/src/libelogind/sd-daemon/sd-daemon.c
b/src/libelogind/sd-daemon/sd-daemon.c
index 3ea9764c45bd383ec24d9272ed9e3b8b61b5db4f..e47da68a66f3cd6a0bcd82998292e15a14b6b8f2 100644
(file)
--- a/
src/libelogind/sd-daemon/sd-daemon.c
+++ b/
src/libelogind/sd-daemon/sd-daemon.c
@@
-595,7
+595,7
@@
_public_ int sd_watchdog_enabled(int unset_environment, uint64_t *usec) {
r = safe_atou64(s, &u);
if (r < 0)
goto finish;
- if (u <= 0) {
+ if (u <= 0
|| u >= USEC_INFINITY
) {
r = -EINVAL;
goto finish;
}