summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2017-05-11 06:52:03 +0200
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-05-11 06:52:03 +0200
commit799238d0416549dd0d59b4efde30fe518d67e0d0 (patch)
tree4ba804f9e08dcb5464fd416ba2cc3993e112d336
parent69f6c981fbfe5b2d77d6e599a92db36be4e07867 (diff)
downloadpacman-799238d0416549dd0d59b4efde30fe518d67e0d0.tar.gz
pacman-799238d0416549dd0d59b4efde30fe518d67e0d0.tar.xz
wip
-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;
}