summaryrefslogtreecommitdiffstats
path: root/src/udev/udev-watch.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
commitfc53809803cd2bc2434e312b19a18fa36776da12 (patch)
treeb4b43bd6538f51965ce32856e9c053d0f90919c8 /src/udev/udev-watch.c
parentAdding upstream version 255.5. (diff)
downloadsystemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz
systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/udev/udev-watch.c')
-rw-r--r--src/udev/udev-watch.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c
index 58c8279..258eb26 100644
--- a/src/udev/udev-watch.c
+++ b/src/udev/udev-watch.c
@@ -232,12 +232,9 @@ int udev_watch_end(int inotify_fd, sd_device *dev) {
_cleanup_close_ int dirfd = -EBADF;
int wd, r;
+ assert(inotify_fd >= 0);
assert(dev);
- /* This may be called by 'udevadm test'. In that case, inotify_fd is not initialized. */
- if (inotify_fd < 0)
- return 0;
-
if (sd_device_get_devname(dev, NULL) < 0)
return 0;