From 02ca585fa6703dbf99f09dd59ea66d0534bc0ac3 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Wed, 9 May 2012 05:51:32 -0700 Subject: [PATCH] Make sure recursion only happens with requires The function recursive_fill_list() is designed to descend lists of packages, so it only makes sense to use with Requires and Requires.private. Ensure it to make later code additions simpler. --- pkg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg.c b/pkg.c index d0394c3..3c09c53 100644 --- a/pkg.c +++ b/pkg.c @@ -574,6 +574,12 @@ recursive_fill_list (Package *pkg, GetListFunc func, GSList **listp) { GSList *tmp; + /* + * This function should only be called to resolve Requires or + * Requires.private. + */ + g_assert (func == get_requires || func == get_requires_private); + fill_one_level (pkg, func, listp); tmp = (*func) (pkg);