diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2015-01-22 06:29:53 +0100 |
---|---|---|
committer | Andrew Gregory <andrew.gregory.8@gmail.com> | 2017-05-11 06:45:30 +0200 |
commit | 2e63d6aa7fcdfd89f02758f02f5799a291405b40 (patch) | |
tree | 03a2661f903afdbc6539b6530bf90aece2b4e55a /lib/libalpm/be_local.c | |
parent | 4143760a944470d50975ee27da9e3380223e88b9 (diff) | |
download | pacman-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_local.c')
-rw-r--r-- | lib/libalpm/be_local.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index 97a49688..bd7e2b89 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -244,7 +244,7 @@ static struct archive *_cache_mtree_open(alpm_pkg_t *pkg) } if((mtree = archive_read_new()) == NULL) { - pkg->handle->pm_errno = ALPM_ERR_LIBARCHIVE; + _alpm_set_errno(pkg->handle, ALPM_ERR_LIBARCHIVE); goto error; } @@ -254,7 +254,7 @@ static struct archive *_cache_mtree_open(alpm_pkg_t *pkg) if((r = _alpm_archive_read_open_file(mtree, mtfile, ALPM_BUFFER_SIZE))) { _alpm_log(pkg->handle, ALPM_LOG_ERROR, _("error while reading file %s: %s\n"), mtfile, archive_error_string(mtree)); - pkg->handle->pm_errno = ALPM_ERR_LIBARCHIVE; + _alpm_set_errno(pkg->handle, ALPM_ERR_LIBARCHIVE); _alpm_archive_read_free(mtree); goto error; } @@ -494,7 +494,7 @@ version_error: closedir(dbdir); db->status &= ~DB_STATUS_VALID; db->status |= DB_STATUS_INVALID; - db->handle->pm_errno = ALPM_ERR_DB_VERSION; + _alpm_set_errno(db->handle, ALPM_ERR_DB_VERSION); return -1; } @@ -1147,7 +1147,7 @@ alpm_db_t *_alpm_db_register_local(alpm_handle_t *handle) db = _alpm_db_new("local", 1); if(db == NULL) { - handle->pm_errno = ALPM_ERR_DB_CREATE; + _alpm_set_errno(handle, ALPM_ERR_DB_CREATE); return NULL; } db->ops = &local_db_ops; |