summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2021-12-10 13:08:38 +0000
committerSimon McVittie <smcv@collabora.com>2022-02-28 22:50:26 +0000
commit7e61e0b53b2555cdd6256b446a2422a6bf969114 (patch)
treed2c69c84b3f27248ab8ba19f6d7c994015062218 /bus
parentf0df3114664c64e95da4b1c88ccd14a8c8b2fed8 (diff)
downloaddbus-7e61e0b53b2555cdd6256b446a2422a6bf969114.tar.gz
bus: Correct check for inotify_init() failure
fd 0 is a valid fd - although if we are using stdin as our inotify fd, something is weird somewhere. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'bus')
-rw-r--r--bus/dir-watch-inotify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bus/dir-watch-inotify.c b/bus/dir-watch-inotify.c
index 940f09a0..6cc02968 100644
--- a/bus/dir-watch-inotify.c
+++ b/bus/dir-watch-inotify.c
@@ -234,7 +234,7 @@ _init_inotify (BusContext *context)
#else
inotify_fd = inotify_init ();
#endif
- if (inotify_fd <= 0)
+ if (inotify_fd < 0)
{
_dbus_warn ("Cannot initialize inotify");
goto out;