Minor optimization: no need to check if obj is NULL, prop_object_type() does that already.

This commit is contained in:
Juan RP
2013-06-14 12:22:29 +02:00
parent 9c44411722
commit 9d80524a34
12 changed files with 14 additions and 32 deletions

View File

@ -151,8 +151,6 @@ xbps_pkgdb_foreach_reverse_cb(struct xbps_handle *xhp,
return rv;
allkeys = prop_dictionary_all_keys(xhp->pkgdb);
assert(allkeys);
for (i = prop_array_count(allkeys); i > 0; i--) {
obj = prop_array_get(allkeys, i);
pkgd = prop_dictionary_get_keysym(xhp->pkgdb, obj);
@ -267,7 +265,7 @@ generate_full_revdeps_tree(struct xbps_handle *xhp)
while ((obj = prop_object_iterator_next(iter))) {
pkgd = prop_dictionary_get_keysym(xhp->pkgdb, obj);
rundeps = prop_dictionary_get(pkgd, "run_depends");
if (rundeps == NULL || !prop_array_count(rundeps))
if (!prop_array_count(rundeps))
continue;
for (i = 0; i < prop_array_count(rundeps); i++) {