pkg: use goto cleanup idiom

bsdstubs-errno
Dylan Baker 2022-08-03 16:32:35 -07:00
parent 38103134a5
commit a391f9b650
1 changed files with 3 additions and 6 deletions

View File

@ -1470,21 +1470,18 @@ pkgconf_pkg_walk_list(pkgconf_client_t *client,
if (pkgdep->serial == client->serial)
{
pkgdep->hits++;
pkgconf_pkg_unref(client, pkgdep);
continue;
goto next;
}
if (skip_flags && (depnode->flags & skip_flags) == skip_flags)
{
pkgconf_pkg_unref(client, pkgdep);
continue;
}
goto next;
pkgconf_audit_log_dependency(client, pkgdep, depnode);
pkgdep->hits++;
pkgdep->serial = client->serial;
eflags |= pkgconf_pkg_traverse_main(client, pkgdep, func, data, depth - 1, skip_flags);
next:
pkgconf_pkg_unref(client, pkgdep);
}