summaryrefslogtreecommitdiff
path: root/udev/udev-event.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-08-04 22:59:58 +0200
committerKay Sievers <kay.sievers@vrfy.org>2011-08-04 22:59:58 +0200
commit869c9031608f0796bb4363d5de5db058fe96fedd (patch)
treec4569f8c48ae4e6e5f046642264e71ad811312d7 /udev/udev-event.c
parentce0119d98af6d8306f0877bd30adda945d1a3621 (diff)
libudev: list - use binary search for list lookup
Diffstat (limited to 'udev/udev-event.c')
-rw-r--r--udev/udev-event.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c
index a4141e9c4b..823768a3e2 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -38,14 +38,15 @@
struct udev_event *udev_event_new(struct udev_device *dev)
{
+ struct udev *udev = udev_device_get_udev(dev);
struct udev_event *event;
event = calloc(1, sizeof(struct udev_event));
if (event == NULL)
return NULL;
event->dev = dev;
- event->udev = udev_device_get_udev(dev);
- udev_list_init(&event->run_list);
+ event->udev = udev;
+ udev_list_init(udev, &event->run_list, false);
event->fd_signal = -1;
event->birth_usec = now_usec();
event->timeout_usec = 60 * 1000 * 1000;
@@ -57,7 +58,7 @@ void udev_event_unref(struct udev_event *event)
{
if (event == NULL)
return;
- udev_list_cleanup_entries(event->udev, &event->run_list);
+ udev_list_cleanup(&event->run_list);
free(event->tmp_node);
free(event->program_result);
free(event->name);