X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=system.c;fp=system.c;h=fb7fbe48cbd945f694d373faf6c74f186a67dd69;hp=82c672ee4900eb65a93bac1e9e587c0e76c9c8dc;hb=c2f1f1908b43f945efc99cb43b49e512ee5d02aa;hpb=a4505284b4d257b490cccd77a50c9c052854e7d5 diff --git a/system.c b/system.c index 82c672e..fb7fbe4 100644 --- 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";