X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=libopkg%2Fopkg.c;h=51989f7f16df06a89e36501c6e5fdd92caa5f544;hp=50f875292b76fa1f4ff79d2480fb72078dc2a2f1;hb=b2b5908e2c248f7d21bde6cee2c523b24793dfa1;hpb=9656d4499de22e10b079c249b70e4dc9ef8e7970 diff --git a/libopkg/opkg.c b/libopkg/opkg.c index 50f8752..51989f7 100644 --- a/libopkg/opkg.c +++ b/libopkg/opkg.c @@ -411,7 +411,7 @@ opkg_install_package (opkg_t *opkg, const char *package_name, opkg_progress_call return OPKG_PACKAGE_ALREADY_INSTALLED; } - new = pkg_hash_fetch_best_installation_candidate_by_name(opkg->conf, package_name, NULL); + new = pkg_hash_fetch_best_installation_candidate_by_name(opkg->conf, package_name); if (!new) { /* XXX: Error: Could not find package to install */ @@ -924,7 +924,9 @@ opkg_list_upgradable_packages (opkg_t *opkg, opkg_package_callback_t callback, v head = prepare_upgrade_list(opkg->conf); for (node=active_list_next(head, head); node; active_list_next(head,node)) { old = list_entry(node, pkg_t, list); - new = pkg_hash_fetch_best_installation_candidate_by_name(opkg->conf, old->name, NULL); + new = pkg_hash_fetch_best_installation_candidate_by_name(opkg->conf, old->name); + if (new == NULL) + continue; package = pkg_t_to_opkg_package_t (new); callback (opkg, package, user_data); opkg_package_free (package);