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

@ -355,11 +355,7 @@ xbps_transaction_autoremove_pkgs(struct xbps_handle *xhp)
int rv = 0;
orphans = xbps_find_pkg_orphans(xhp, NULL);
if (prop_object_type(orphans) != PROP_TYPE_ARRAY)
return EINVAL;
count = prop_array_count(orphans);
if (count == 0) {
if ((count = prop_array_count(orphans)) == 0) {
/* no orphans? we are done */
rv = ENOENT;
goto out;