From 2e63d6aa7fcdfd89f02758f02f5799a291405b40 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Thu, 22 Jan 2015 00:29:53 -0500 Subject: make pm_errno thread-local Signed-off-by: Andrew Gregory --- lib/libalpm/util.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/util.h') diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h index e1423ce3..d63cca74 100644 --- a/lib/libalpm/util.h +++ b/lib/libalpm/util.h @@ -63,12 +63,12 @@ void _alpm_alloc_fail(size_t size); #define RET_ERR_VOID(handle, err) do { \ _alpm_log(handle, ALPM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerror(err)); \ - (handle)->pm_errno = (err); \ + _alpm_set_errno(handle, err); \ return; } while(0) #define RET_ERR(handle, err, ret) do { \ _alpm_log(handle, ALPM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerror(err)); \ - (handle)->pm_errno = (err); \ + _alpm_set_errno(handle, err); \ return (ret); } while(0) #define RET_ERR_ASYNC_SAFE(handle, err, ret) do { \ @@ -77,7 +77,7 @@ void _alpm_alloc_fail(size_t size); #define DOUBLE_EQ(x, y) (fabs((x) - (y)) < DBL_EPSILON) -#define CHECK_HANDLE(handle, action) do { if(!(handle)) { action; } (handle)->pm_errno = ALPM_ERR_OK; } while(0) +#define CHECK_HANDLE(handle, action) do { if(!(handle)) { action; } _alpm_set_errno(handle, ALPM_ERR_OK); } while(0) /** Standard buffer size used throughout the library. */ #ifdef BUFSIZ -- cgit v1.2.3-24-g4f1b