Avoid calling _next() function because it's an exported function and
linker can not optimize it.
Thanks to "Gustavo Sverzut Barbieri <barbieri@profusion.mobi>" for
suggestion.
const void *data) __must_check __attribute__((nonnull(2)));
struct kmod_list *kmod_list_remove_n_latest(struct kmod_list *list,
unsigned int n) __must_check;
+#undef kmod_list_foreach
+#define kmod_list_foreach(list_entry, first_entry) \
+ for (list_entry = ((first_entry) == NULL) ? NULL : first_entry; \
+ list_entry != NULL; \
+ list_entry = (list_entry->node.next == &first_entry->node) ? NULL : \
+ container_of(list_entry->node.next, struct kmod_list, node))
/* libkmod.c */
const char *kmod_get_dirname(const struct kmod_ctx *ctx) __attribute__((nonnull(1)));