summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_sync.c
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2015-01-22 06:29:53 +0100
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-05-11 06:45:30 +0200
commit2e63d6aa7fcdfd89f02758f02f5799a291405b40 (patch)
tree03a2661f903afdbc6539b6530bf90aece2b4e55a /lib/libalpm/be_sync.c
parent4143760a944470d50975ee27da9e3380223e88b9 (diff)
downloadpacman-2e63d6aa7fcdfd89f02758f02f5799a291405b40.tar.gz
pacman-2e63d6aa7fcdfd89f02758f02f5799a291405b40.tar.xz
make pm_errno thread-local
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Diffstat (limited to 'lib/libalpm/be_sync.c')
-rw-r--r--lib/libalpm/be_sync.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 46959298..cf91e3c9 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -78,7 +78,7 @@ static int sync_db_validate(alpm_db_t *db)
return 0;
}
if(db->status & DB_STATUS_INVALID) {
- db->handle->pm_errno = ALPM_ERR_DB_INVALID_SIG;
+ _alpm_set_errno(db->handle, ALPM_ERR_DB_INVALID_SIG);
return -1;
}
@@ -126,7 +126,7 @@ static int sync_db_validate(alpm_db_t *db)
if(ret) {
db->status &= ~DB_STATUS_VALID;
db->status |= DB_STATUS_INVALID;
- db->handle->pm_errno = ALPM_ERR_DB_INVALID_SIG;
+ _alpm_set_errno(db->handle, ALPM_ERR_DB_INVALID_SIG);
return 1;
}
}
@@ -186,7 +186,7 @@ int SYMEXPORT alpm_db_update(int force, alpm_db_t *db)
/* Sanity checks */
ASSERT(db != NULL, return -1);
handle = db->handle;
- handle->pm_errno = ALPM_ERR_OK;
+ _alpm_set_errno(handle, ALPM_ERR_OK);
ASSERT(db != handle->db_local, RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1));
ASSERT(db->servers != NULL, RET_ERR(handle, ALPM_ERR_SERVER_NONE, -1));
@@ -501,7 +501,7 @@ 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;
+ _alpm_set_errno(db->handle, ALPM_ERR_MEMORY);
ret = -1;
goto cleanup;
}