Signed-off-by: Michael Jones <[email protected]>
---
 watchdog.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/watchdog.c b/watchdog.c
index 9d770b4..20b6e20 100644
--- a/watchdog.c
+++ b/watchdog.c
@@ -65,8 +65,7 @@ static int watchdog_open(bool cloexec)
     if (wdt_fd < 0)
         return wdt_fd;
 
-    if (cloexec)
-        fcntl(wdt_fd, F_SETFD, fcntl(wdt_fd, F_GETFD) | FD_CLOEXEC);
+    watchdog_set_cloexec(cloexec);
 
     return wdt_fd;
 }
-- 
2.26.2


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to