From 4a1946ab90b3b98c1362e0fc366867bd56418bf9 Mon Sep 17 00:00:00 2001 From: graham.gower Date: Thu, 05 Nov 2009 23:27:37 -0500 Subject: Remove dead code. We would segfault before following this code path. git-svn-id: http://opkg.googlecode.com/svn/trunk@267 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c index a67129e..b3ece9c 100644 --- a/libopkg/opkg_install.c +++ b/libopkg/opkg_install.c @@ -581,14 +581,13 @@ static int pkg_remove_orphan_dependent(opkg_conf_t *conf, pkg_t *pkg, pkg_t *old int i, j, found; char *buf, *d_str; pkg_t *p; + if (!old_pkg) return 0; - if (!pkg) { - fprintf(stderr, "pkg shall not be NULL here. please send to the bugzilla!! [%s %d]\n", __FILE__, __LINE__); - return -1; - } + if (old_pkg->depends_count == 0) return 0; + for (i=0;idepends_count;i++) { found = 0; for (j=0;jdepends_count;j++) { -- cgit v0.9.1