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/log.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/log.c')
-rw-r--r-- | lib/libalpm/log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c index 82c0edad..26f811e5 100644 --- a/lib/libalpm/log.c +++ b/lib/libalpm/log.c @@ -76,11 +76,11 @@ int SYMEXPORT alpm_logaction(alpm_handle_t *handle, const char *prefix, /* if we couldn't open it, we have an issue */ if(fd < 0 || (handle->logstream = fdopen(fd, "a")) == NULL) { if(errno == EACCES) { - handle->pm_errno = ALPM_ERR_BADPERMS; + _alpm_set_errno(handle, ALPM_ERR_BADPERMS); } else if(errno == ENOENT) { - handle->pm_errno = ALPM_ERR_NOT_A_DIR; + _alpm_set_errno(handle, ALPM_ERR_NOT_A_DIR); } else { - handle->pm_errno = ALPM_ERR_SYSTEM; + _alpm_set_errno(handle, ALPM_ERR_SYSTEM); } ret = -1; } |