pkg: pkg_walk_list() does not need a reference to the parent node in the graph
parent
ccda6b3752
commit
1caa0dca87
7
pkg.c
7
pkg.c
|
@ -301,8 +301,7 @@ pkg_verify_graph(pkg_t *root, int depth, unsigned int flags)
|
|||
}
|
||||
|
||||
static inline void
|
||||
pkg_walk_list(pkg_t *parent,
|
||||
pkg_dependency_t *deplist,
|
||||
pkg_walk_list(pkg_dependency_t *deplist,
|
||||
void (*pkg_traverse_func)(pkg_t *package, void *data),
|
||||
void *data,
|
||||
int maxdepth,
|
||||
|
@ -346,10 +345,10 @@ pkg_traverse(pkg_t *root,
|
|||
if (maxdepth == 0)
|
||||
return;
|
||||
|
||||
pkg_walk_list(root, root->requires, pkg_traverse_func, data, maxdepth - 1, flags);
|
||||
pkg_walk_list(root->requires, pkg_traverse_func, data, maxdepth - 1, flags);
|
||||
|
||||
if (flags & PKGF_SEARCH_PRIVATE)
|
||||
pkg_walk_list(root, root->requires_private, pkg_traverse_func, data, maxdepth - 1, flags);
|
||||
pkg_walk_list(root->requires_private, pkg_traverse_func, data, maxdepth - 1, flags);
|
||||
|
||||
if (pkg_traverse_func != NULL)
|
||||
pkg_traverse_func(root, data);
|
||||
|
|
Loading…
Reference in New Issue