diff options
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r-- | lib/libalpm/trans.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 7689079b..c142ea3b 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -204,17 +204,17 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data) if(trans->add == NULL) { if(_alpm_remove_packages(handle, 1) == -1) { /* pm_errno is set by _alpm_remove_packages() */ - alpm_errno_t save = handle->pm_errno; + alpm_errno_t save = alpm_errno(handle); alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction failed\n"); - handle->pm_errno = save; + _alpm_set_errno(handle, save); return -1; } } else { if(_alpm_sync_commit(handle) == -1) { /* pm_errno is set by _alpm_sync_commit() */ - alpm_errno_t save = handle->pm_errno; + alpm_errno_t save = alpm_errno(handle); alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction failed\n"); - handle->pm_errno = save; + _alpm_set_errno(handle, save); return -1; } } |