projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
system: fix undefined behavior in wdt offline check
[project/procd.git]
/
system.c
diff --git
a/system.c
b/system.c
index
82c672e
..
fb7fbe4
100644
(file)
--- a/
system.c
+++ b/
system.c
@@
-282,7
+282,7
@@
static int watchdog_set(struct ubus_context *ctx, struct ubus_object *obj,
if (tb[WDT_STOP])
watchdog_set_stopped(blobmsg_get_bool(tb[WDT_STOP]));
- if (watchdog_fd()
< 0
)
+ if (watchdog_fd()
== NULL
)
status = "offline";
else if (watchdog_get_stopped())
status = "stopped";