From 6695cd4c3409a5a0873cc041fbfa6bb38711149d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Wed, 17 May 2017 20:14:20 +0200 Subject: Simplify inotify cleanup --- autoreload_inotify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoreload_inotify.c b/autoreload_inotify.c index e44c2f3..8e4d67a 100644 --- a/autoreload_inotify.c +++ b/autoreload_inotify.c @@ -27,8 +27,8 @@ CLEANUP void arl_cleanup(arl_t *arl) { - if (arl->fd != -1 && arl->wd != -1) - inotify_rm_watch(arl->fd, arl->wd); + if (arl->fd != -1) + close(arl->fd); } static void arl_setup_dir(arl_t *arl, const char *filepath) -- cgit v1.2.3