X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fpath.c;h=20e454d96f4c1ba04a463c7ac92d920303e12948;hb=03e334a1c7dc8c20c38902aa039440763acc9b17;hp=93c51bb3bec5b0363003c7624e077f252bfd9b4a;hpb=2c5859afecee81e345fc9526b1083bf79990ffb8;p=elogind.git diff --git a/src/core/path.c b/src/core/path.c index 93c51bb3b..20e454d96 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -152,11 +152,7 @@ void path_spec_unwatch(PathSpec *s) { assert(s); s->event_source = sd_event_source_unref(s->event_source); - - if (s->inotify_fd >= 0) { - close_nointr_nofail(s->inotify_fd); - s->inotify_fd = -1; - } + s->inotify_fd = safe_close(s->inotify_fd); } int path_spec_fd_event(PathSpec *s, uint32_t revents) {