Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/be_sync.c')
-rw-r--r--lib/libalpm/be_sync.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 5f457122..2cee97e0 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -464,9 +464,8 @@ static int sync_db_populate(alpm_db_t *db)
db->pkgcache = _alpm_pkghash_create(est_count);
if(db->pkgcache == NULL) {
- db->handle->pm_errno = ALPM_ERR_MEMORY;
ret = -1;
- goto cleanup;
+ GOTO_ERR(db->handle, ALPM_ERR_MEMORY, cleanup);
}
while((archive_ret = archive_read_next_header(archive, &entry)) == ARCHIVE_OK) {
@@ -485,9 +484,8 @@ static int sync_db_populate(alpm_db_t *db)
_alpm_log(db->handle, ALPM_LOG_ERROR, _("could not read db '%s' (%s)\n"),
db->treename, archive_error_string(archive));
_alpm_db_free_pkgcache(db);
- db->handle->pm_errno = ALPM_ERR_LIBARCHIVE;
ret = -1;
- goto cleanup;
+ GOTO_ERR(db->handle, ALPM_ERR_LIBARCHIVE, cleanup);
}
count = alpm_list_count(db->pkgcache->list);