From 19b8b638851713da64dd2aa7ff31e911ffe925cd Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Sun, 7 Jun 2009 14:30:11 +0200 Subject: Introduce _alpm_pkg_free_trans() The main purpose of this function to make our code more readable. It frees transaction specific fields of pmpkg_t. (It is used when a package is removed from the target list.) Signed-off-by: Nagy Gabor Signed-off-by: Dan McGee --- lib/libalpm/trans.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/libalpm/trans.c') diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 64bec84e..fcbb5e2f 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -248,12 +248,7 @@ void _alpm_trans_free(pmtrans_t *trans) } if(trans->type == PM_TRANS_TYPE_SYNC) { - alpm_list_t *i; - for(i = trans->packages; i; i = i->next) { - pmpkg_t *pkg = i->data; - alpm_list_free(pkg->removes); - pkg->removes = NULL; - } + alpm_list_free_inner(trans->packages, (alpm_list_fn_free)_alpm_pkg_free_trans); } else { alpm_list_free_inner(trans->packages, (alpm_list_fn_free)_alpm_pkg_free); } -- cgit v1.2.3-24-g4f1b