Fix infinite loop in list_upgradable in libopkg.
[oweals/opkg-lede.git] / libopkg / opkg.c
index 705156aa7b24ecc2f0f5f4552ab3a9e052d42006..be38d4f23ca0a502914b2d35c13ca837dad32bd7 100644 (file)
@@ -760,7 +760,7 @@ opkg_list_upgradable_packages(opkg_package_callback_t callback, void *user_data)
 
        head = prepare_upgrade_list();
        for (node = active_list_next(head, head); node;
-            active_list_next(head, node)) {
+            node = active_list_next(head, node)) {
                old = list_entry(node, pkg_t, list);
                new = pkg_hash_fetch_best_installation_candidate_by_name(old->name);
                if (new == NULL)