diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-12-23 15:54:05 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-12-23 15:54:05 +0000 |
commit | 06b703488213c534f3430a03cd60952254e6b661 (patch) | |
tree | f15f621bddcb2fb277ae2718ff0e78967ad50810 /src | |
parent | e9dd8a1fa2841fa0e2a4bb983b74c738cbc8ef68 (diff) | |
download | rspamd-06b703488213c534f3430a03cd60952254e6b661.tar.gz rspamd-06b703488213c534f3430a03cd60952254e6b661.zip |
[Minor] Improve align_ptr macro
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/mem_pool_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/mem_pool_internal.h b/src/libutil/mem_pool_internal.h index 9341fce08..e7a5ecaf2 100644 --- a/src/libutil/mem_pool_internal.h +++ b/src/libutil/mem_pool_internal.h @@ -22,7 +22,7 @@ */ #define align_ptr(p, a) \ - (guint8 *) (((uintptr_t) (p) + ((uintptr_t) a - 1)) & ~((uintptr_t) a - 1)) + ((guint8 *) ((uintptr_t) (p) + ((-(intptr_t)(p)) & ((a) - 1)))) enum rspamd_mempool_chain_type { RSPAMD_MEMPOOL_NORMAL = 0, |