summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-11-16 21:15:49 -0600
committerDan McGee <dan@archlinux.org>2007-11-16 21:15:49 -0600
commitcfcc550e2ac55616c81d2347c2467aec9d56d25e (patch)
tree5ecfa82e875fc9fb3824eef748f7d59bc59f0784 /lib
parent2322909703eb2f30ac0ef7273420f13c5f61410b (diff)
libalpm: use FREELIST when possible
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c3
-rw-r--r--lib/libalpm/conflict.c6
-rw-r--r--lib/libalpm/package.c3
3 files changed, 4 insertions, 8 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index adfa8f0c..ea661dc4 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -295,8 +295,7 @@ static int upgrade_remove(pmpkg_t *oldpkg, pmpkg_t *newpkg, pmtrans_t *trans, pm
tr = NULL;
/* restore our "NoUpgrade" list to previous state */
- alpm_list_free_inner(handle->noupgrade, free);
- alpm_list_free(handle->noupgrade);
+ FREELIST(handle->noupgrade);
handle->noupgrade = old_noupgrade;
if(ret == -1) {
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 754d5a91..91fd794d 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -307,8 +307,7 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
conflicts = add_fileconflict(conflicts, PM_CONFLICT_TYPE_TARGET, path,
alpm_pkg_get_name(p1), alpm_pkg_get_name(p2));
}
- alpm_list_free_inner(tmpfiles, &free);
- alpm_list_free(tmpfiles);
+ FREELIST(tmpfiles);
}
}
@@ -413,8 +412,7 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
}
}
}
- alpm_list_free_inner(tmpfiles, &free);
- alpm_list_free(tmpfiles);
+ FREELIST(tmpfiles);
}
return(conflicts);
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 75dabd84..f96b7914 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -1022,8 +1022,7 @@ pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full)
_alpm_log(PM_LOG_ERROR, _("missing package filelist in %s, generating one\n"), pkgfile);
info->files = all_files;
} else {
- alpm_list_free_inner(all_files, free);
- alpm_list_free(all_files);
+ FREELIST(all_files);
}
/* this is IMPORTANT - "checking for conflicts" requires a sorted list, so we