From 2c59b61f6ab4ff5373267523afe672caa6738dee Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Tue, 10 Dec 2013 06:29:55 -0500 Subject: [PATCH 2/5] udev: drop 'udev' paramter from udev_list_init() Drop the now-unused 'udev' parameter from the internal private API udev_list_init(). https://bugs.freedesktop.org/show_bug.cgi?id=72562 --- src/libudev/libudev-device.c | 10 +++++----- src/libudev/libudev-enumerate.c | 16 ++++++++-------- src/libudev/libudev-hwdb.c | 2 +- src/libudev/libudev-list.c | 2 +- src/libudev/libudev-monitor.c | 4 ++-- src/libudev/libudev-private.h | 2 +- src/libudev/libudev-queue.c | 2 +- src/libudev/libudev.c | 2 +- src/udev/udev-event.c | 4 ++-- src/udev/udev-rules.c | 2 +- src/udev/udevadm-hwdb.c | 2 +- src/udev/udevadm-monitor.c | 4 ++-- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index 9558ac3..4550cf5 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -650,11 +650,11 @@ struct udev_device *udev_device_new(struct udev *udev) return NULL; udev_device->refcount = 1; udev_device->udev = udev; - udev_list_init(udev, &udev_device->devlinks_list, true); - udev_list_init(udev, &udev_device->properties_list, true); - udev_list_init(udev, &udev_device->sysattr_value_list, true); - udev_list_init(udev, &udev_device->sysattr_list, false); - udev_list_init(udev, &udev_device->tags_list, true); + udev_list_init(&udev_device->devlinks_list, true); + udev_list_init(&udev_device->properties_list, true); + udev_list_init(&udev_device->sysattr_value_list, true); + udev_list_init(&udev_device->sysattr_list, false); + udev_list_init(&udev_device->tags_list, true); udev_device->watch_handle = -1; /* copy global properties */ udev_list_entry_foreach(list_entry, udev_get_properties_list_entry(udev)) diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c index 48ffe83..15e679f 100644 --- a/src/libudev/libudev-enumerate.c +++ b/src/libudev/libudev-enumerate.c @@ -88,14 +88,14 @@ _public_ struct udev_enumerate *udev_enumerate_new(struct udev *udev) return NULL; udev_enumerate->refcount = 1; udev_enumerate->udev = udev; - udev_list_init(udev, &udev_enumerate->sysattr_match_list, false); - udev_list_init(udev, &udev_enumerate->sysattr_nomatch_list, false); - udev_list_init(udev, &udev_enumerate->subsystem_match_list, true); - udev_list_init(udev, &udev_enumerate->subsystem_nomatch_list, true); - udev_list_init(udev, &udev_enumerate->sysname_match_list, true); - udev_list_init(udev, &udev_enumerate->properties_match_list, false); - udev_list_init(udev, &udev_enumerate->tags_match_list, true); - udev_list_init(udev, &udev_enumerate->devices_list, false); + udev_list_init(&udev_enumerate->sysattr_match_list, false); + udev_list_init(&udev_enumerate->sysattr_nomatch_list, false); + udev_list_init(&udev_enumerate->subsystem_match_list, true); + udev_list_init(&udev_enumerate->subsystem_nomatch_list, true); + udev_list_init(&udev_enumerate->sysname_match_list, true); + udev_list_init(&udev_enumerate->properties_match_list, false); + udev_list_init(&udev_enumerate->tags_match_list, true); + udev_list_init(&udev_enumerate->devices_list, false); return udev_enumerate; } diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c index b53b35c..5a62e27 100644 --- a/src/libudev/libudev-hwdb.c +++ b/src/libudev/libudev-hwdb.c @@ -273,7 +273,7 @@ _public_ struct udev_hwdb *udev_hwdb_new(struct udev *udev) { return NULL; hwdb->refcount = 1; - udev_list_init(udev, &hwdb->properties_list, true); + udev_list_init(&hwdb->properties_list, true); hwdb->f = fopen("/etc/udev/hwdb.bin", "re"); if (!hwdb->f) { diff --git a/src/libudev/libudev-list.c b/src/libudev/libudev-list.c index 530cc03..33f38f9 100644 --- a/src/libudev/libudev-list.c +++ b/src/libudev/libudev-list.c @@ -93,7 +93,7 @@ static inline struct udev_list_entry *list_node_to_entry(struct udev_list_node * return container_of(node, struct udev_list_entry, node); } -void udev_list_init(struct udev *udev, struct udev_list *list, bool unique) +void udev_list_init(struct udev_list *list, bool unique) { memset(list, 0x00, sizeof(struct udev_list)); list->unique = unique; diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c index 56a6c5e..6b24b38 100644 --- a/src/libudev/libudev-monitor.c +++ b/src/libudev/libudev-monitor.c @@ -100,8 +100,8 @@ static struct udev_monitor *udev_monitor_new(struct udev *udev) return NULL; udev_monitor->refcount = 1; udev_monitor->udev = udev; - udev_list_init(udev, &udev_monitor->filter_subsystem_list, false); - udev_list_init(udev, &udev_monitor->filter_tag_list, true); + udev_list_init(&udev_monitor->filter_subsystem_list, false); + udev_list_init(&udev_monitor->filter_tag_list, true); return udev_monitor; } diff --git a/src/libudev/libudev-private.h b/src/libudev/libudev-private.h index 6b62c56..0c97775 100644 --- a/src/libudev/libudev-private.h +++ b/src/libudev/libudev-private.h @@ -122,7 +122,7 @@ void udev_list_node_remove(struct udev_list_node *entry); for (node = (list)->next, tmp = (node)->next; \ node != list; \ node = tmp, tmp = (tmp)->next) -void udev_list_init(struct udev *udev, struct udev_list *list, bool unique); +void udev_list_init(struct udev_list *list, bool unique); void udev_list_cleanup(struct udev_list *list); struct udev_list_entry *udev_list_get_entry(struct udev_list *list); struct udev_list_entry *udev_list_entry_add(struct udev_list *list, const char *name, const char *value); diff --git a/src/libudev/libudev-queue.c b/src/libudev/libudev-queue.c index f67dba9..973d350 100644 --- a/src/libudev/libudev-queue.c +++ b/src/libudev/libudev-queue.c @@ -74,7 +74,7 @@ _public_ struct udev_queue *udev_queue_new(struct udev *udev) return NULL; udev_queue->refcount = 1; udev_queue->udev = udev; - udev_list_init(udev, &udev_queue->queue_list, false); + udev_list_init(&udev_queue->queue_list, false); return udev_queue; } diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c index bc73a5a..bfaf5e1 100644 --- a/src/libudev/libudev.c +++ b/src/libudev/libudev.c @@ -126,7 +126,7 @@ _public_ struct udev *udev_new(void) udev->refcount = 1; udev->log_fn = log_stderr; udev->log_priority = LOG_INFO; - udev_list_init(udev, &udev->properties_list, true); + udev_list_init(&udev->properties_list, true); f = fopen("/etc/udev/udev.conf", "re"); if (f != NULL) { diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 0d1049c..b2e20b2 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -44,8 +44,8 @@ struct udev_event *udev_event_new(struct udev_device *dev) return NULL; event->dev = dev; event->udev = udev; - udev_list_init(udev, &event->run_list, false); - udev_list_init(udev, &event->seclabel_list, false); + udev_list_init(&event->run_list, false); + udev_list_init(&event->seclabel_list, false); event->fd_signal = -1; event->birth_usec = now(CLOCK_MONOTONIC); event->timeout_usec = 30 * 1000 * 1000; diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index f793e57..3539368 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -1617,7 +1617,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) return NULL; rules->udev = udev; rules->resolve_names = resolve_names; - udev_list_init(udev, &file_list, true); + udev_list_init(&file_list, true); /* init token array and string buffer */ rules->tokens = malloc(PREALLOC_TOKEN * sizeof(struct token)); diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index d0cce84..b4d8bb2 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -440,7 +440,7 @@ static int import_file(struct udev *udev, struct trie *trie, const char *filenam char line[LINE_MAX]; struct udev_list match_list; - udev_list_init(udev, &match_list, false); + udev_list_init(&match_list, false); f = fopen(filename, "re"); if (f == NULL) diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c index 4d6af49..581a75e 100644 --- a/src/udev/udevadm-monitor.c +++ b/src/udev/udevadm-monitor.c @@ -92,8 +92,8 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) {} }; - udev_list_init(udev, &subsystem_match_list, true); - udev_list_init(udev, &tag_match_list, true); + udev_list_init(&subsystem_match_list, true); + udev_list_init(&tag_match_list, true); for (;;) { option = getopt_long(argc, argv, "pekus:t:h", options, NULL); -- 1.8.4.2