X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=libudev%2Flibudev.h;h=8b5391c066664c66802204ecceeed91460f71d42;hp=ffeb80f8d30e9e1c9fdb1c55af66cf6d18d05c1f;hb=2417dc20f5147556d0ed4f95a37b1547fb4b0f2b;hpb=48a9b173e88738ff4eefb3519f1d27711b417c8d diff --git a/libudev/libudev.h b/libudev/libudev.h index ffeb80f8d..8b5391c06 100644 --- a/libudev/libudev.h +++ b/libudev/libudev.h @@ -47,10 +47,17 @@ struct udev_list_entry *udev_list_entry_get_next(struct udev_list_entry *list_en struct udev_list_entry *udev_list_entry_get_by_name(struct udev_list_entry *list_entry, const char *name); const char *udev_list_entry_get_name(struct udev_list_entry *list_entry); const char *udev_list_entry_get_value(struct udev_list_entry *list_entry); -#define udev_list_entry_foreach(entry, first) \ - for (entry = first; \ - entry != NULL; \ - entry = udev_list_entry_get_next(entry)) +/** + * udev_list_entry_foreach: + * @list_entry: entry to store the current position + * @first_entry: first entry to start with + * + * Helper to iterate over all entries of a list. + */ +#define udev_list_entry_foreach(list_entry, first_entry) \ + for (list_entry = first_entry; \ + list_entry != NULL; \ + list_entry = udev_list_entry_get_next(list_entry)) /* * udev_device