summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-04-27 01:57:09 +0200
committerDan McGee <dan@archlinux.org>2007-04-27 20:29:23 +0200
commitdb9e10f14215ab6453cd663a62cae5bdfac3d61b (patch)
treed94d3af1f79988549f50e6ea52e25da94d3f8125 /lib/libalpm/add.c
parent75efcbbff6a9e1db543f04693f70780413369a85 (diff)
downloadpacman-db9e10f14215ab6453cd663a62cae5bdfac3d61b.tar.gz
pacman-db9e10f14215ab6453cd663a62cae5bdfac3d61b.tar.xz
Remove FREETRANS macro and correctly type _alpm_trans_free
Remove an unnecessary macro, and get rid of the void pointer. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 3c6aebd9..adbddb28 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -386,12 +386,14 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
}
if(_alpm_trans_init(tr, PM_TRANS_TYPE_UPGRADE, trans->flags, NULL, NULL, NULL) == -1) {
- FREETRANS(tr);
+ _alpm_trans_free(tr);
+ tr = NULL;
RET_ERR(PM_ERR_TRANS_ABORT, -1);
}
if(_alpm_remove_loadtarget(tr, db, newpkg->name) == -1) {
- FREETRANS(tr);
+ _alpm_trans_free(tr);
+ tr = NULL;
RET_ERR(PM_ERR_TRANS_ABORT, -1);
}
@@ -413,7 +415,9 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
int ret = _alpm_remove_commit(tr, db);
- FREETRANS(tr);
+ _alpm_trans_free(tr);
+ tr = NULL;
+
/* restore our "NoUpgrade" list to previous state */
alpm_list_free_inner(handle->noupgrade, free);
alpm_list_free(handle->noupgrade);