summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/be_sync.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 77f71956..8881ae26 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -486,7 +486,7 @@ static int sync_db_populate(alpm_db_t *db)
fd = _alpm_open_archive(db->handle, dbpath, &buf,
&archive, ALPM_ERR_DB_OPEN);
if(fd < 0) {
- if(db->handle->pm_errno == ALPM_ERR_DB_INVALID) {
+ if(alpm_errno(db->handle) == ALPM_ERR_DB_INVALID) {
db->status &= DB_STATUS_INVALID;
}
return -1;
@@ -522,7 +522,7 @@ 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;
+ _alpm_set_errno(db->handle, ALPM_ERR_LIBARCHIVE);
ret = -1;
goto cleanup;
}