From db9e10f14215ab6453cd663a62cae5bdfac3d61b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 26 Apr 2007 19:57:09 -0400 Subject: 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 --- lib/libalpm/alpm.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/libalpm/alpm.c') 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) { -- cgit v1.2.3-24-g4f1b