From: Jo-Philipp Wich Date: Wed, 15 Feb 2017 22:39:47 +0000 (+0100) Subject: libopkg: fix unsatisfied dependency reporting X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=commitdiff_plain;h=a5de03e4dce94f10a6efdf22fbddc20636004e8d libopkg: fix unsatisfied dependency reporting Previous refactoring of pkg_hash_fetch_unsatisfied_dependencies() caused the outermost loop counter variable to not get incremented anymore, causing the function to always report the first dependency as unsatisifed. Signed-off-by: Jo-Philipp Wich --- diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c index b2e0df0..a12b313 100644 --- a/libopkg/pkg_depends.c +++ b/libopkg/pkg_depends.c @@ -90,7 +90,7 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t * unsatisfied, the_lost = NULL; /* foreach dependency */ - for (; compound_depend && compound_depend->type; compound_depend++) { + for (i = 0; compound_depend && compound_depend->type; compound_depend++, i++) { depend_t **possible_satisfiers = compound_depend->possibilities;; found = 0;