summaryrefslogtreecommitdiffstats
path: root/src/udev/udevadm-lock.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-03-29 18:52:25 +0200
committerLennart Poettering <lennart@poettering.net>2023-03-29 19:09:10 +0200
commite829f28c1bc6e6865261bfb3bc26089f50e0c7bd (patch)
tree9b18d5f74ea7f77f2a14f1c849a065d219e5a78c /src/udev/udevadm-lock.c
parentfdset: add new helper to convert an fdset to an array (diff)
downloadsystemd-e829f28c1bc6e6865261bfb3bc26089f50e0c7bd.tar.xz
systemd-e829f28c1bc6e6865261bfb3bc26089f50e0c7bd.zip
fdset: add new fdset_consume() helper
Diffstat (limited to 'src/udev/udevadm-lock.c')
-rw-r--r--src/udev/udevadm-lock.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/udev/udevadm-lock.c b/src/udev/udevadm-lock.c
index d19e7561f8..9a4a8adbc3 100644
--- a/src/udev/udevadm-lock.c
+++ b/src/udev/udevadm-lock.c
@@ -334,11 +334,9 @@ int lock_main(int argc, char *argv[], void *userdata) {
if (fd < 0)
return fd;
- r = fdset_put(fds, fd);
+ r = fdset_consume(fds, TAKE_FD(fd));
if (r < 0)
return log_oom();
-
- TAKE_FD(fd);
}
}