nsxiv6695cd4
Simplify inotify cleanup
+2 −2
1 file changed
- M autoreload_inotify.c +2 −2
| @@ -27,8 +27,8 @@ | |||
| 27 | 27 | ||
| 28 | 28 | CLEANUP void arl_cleanup(arl_t *arl) | |
| 29 | 29 | { | |
| 30 | − | if (arl->fd != -1 && arl->wd != -1) | |
| 31 | − | inotify_rm_watch(arl->fd, arl->wd); | |
| 30 | + | if (arl->fd != -1) | |
| 31 | + | close(arl->fd); | |
| 32 | 32 | } | |
| 33 | 33 | ||
| 34 | 34 | static void arl_setup_dir(arl_t *arl, const char *filepath) | |