summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.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/alpm.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/alpm.c')
-rw-r--r--lib/libalpm/alpm.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 74c07107..1b7eea59 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -99,11 +99,6 @@ int SYMEXPORT alpm_release()
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
- /* free the transaction if there is any */
- if(handle->trans) {
- alpm_trans_release();
- }
-
/* close local database */
if(handle->db_local) {
alpm_db_unregister(handle->db_local);
@@ -768,7 +763,7 @@ int SYMEXPORT alpm_trans_release()
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(trans->state != STATE_IDLE, RET_ERR(PM_ERR_TRANS_NULL, -1));
- /* during a commit do not interrupt inmediatelly, just after a target */
+ /* during a commit do not interrupt immediately, just after a target */
if(trans->state == STATE_COMMITING || trans->state == STATE_INTERRUPTED) {
if(trans->state == STATE_COMMITING) {
trans->state = STATE_INTERRUPTED;
@@ -777,7 +772,8 @@ int SYMEXPORT alpm_trans_release()
return(-1);
}
- FREETRANS(handle->trans);
+ _alpm_trans_free(trans);
+ handle->trans = NULL;
/* unlock db */
if(handle->lckfd != -1) {