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/sync.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/sync.c') diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 4e0a1988..de235d71 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -951,7 +951,8 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data) goto error; } } - FREETRANS(tr); + _alpm_trans_free(tr); + tr = NULL; /* install targets */ _alpm_log(PM_LOG_DEBUG, _("installing packages")); @@ -993,7 +994,8 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data) _alpm_log(PM_LOG_ERROR, _("could not commit transaction")); goto error; } - FREETRANS(tr); + _alpm_trans_free(tr); + tr = NULL; /* propagate replaced packages' requiredby fields to their new owners */ if(replaces) { @@ -1058,7 +1060,8 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data) return(0); error: - FREETRANS(tr); + _alpm_trans_free(tr); + tr = NULL; /* commiting failed, so this is still just a prepared transaction */ trans->state = STATE_PREPARED; return(-1); -- cgit v1.2.3-2-g168b