summaryrefslogtreecommitdiffstats
path: root/src/udev/udev-ctrl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-10-02 10:00:00 +0200
committerLennart Poettering <lennart@poettering.net>2020-10-07 09:40:32 +0200
commitcbda8bd5fba097a6c90262828e8934b63e2efb22 (patch)
tree9baf15a53ca1ebed9abb654b3b7c484ff18ed3cf /src/udev/udev-ctrl.c
parentsd-event: support callback=NULL in IO/child/inotify/defer event sources, too (diff)
downloadsystemd-cbda8bd5fba097a6c90262828e8934b63e2efb22.tar.xz
systemd-cbda8bd5fba097a6c90262828e8934b63e2efb22.zip
udev: make use of NULL callback in IO handlers
Diffstat (limited to '')
-rw-r--r--src/udev/udev-ctrl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c
index dafe3da251..9deb3864b5 100644
--- a/src/udev/udev-ctrl.c
+++ b/src/udev/udev-ctrl.c
@@ -355,10 +355,6 @@ int udev_ctrl_send(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, int in
return 0;
}
-static int udev_ctrl_wait_io_handler(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
- return sd_event_exit(sd_event_source_get_event(s), 0);
-}
-
int udev_ctrl_wait(struct udev_ctrl *uctrl, usec_t timeout) {
_cleanup_(sd_event_source_unrefp) sd_event_source *source_io = NULL, *source_timeout = NULL;
int r;
@@ -385,7 +381,7 @@ int udev_ctrl_wait(struct udev_ctrl *uctrl, usec_t timeout) {
return r;
}
- r = sd_event_add_io(uctrl->event, &source_io, uctrl->sock, EPOLLIN, udev_ctrl_wait_io_handler, NULL);
+ r = sd_event_add_io(uctrl->event, &source_io, uctrl->sock, EPOLLIN, NULL, INT_TO_PTR(0));
if (r < 0)
return r;