summaryrefslogtreecommitdiffstats
path: root/contrib/mempattern.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/mempattern.h')
-rw-r--r--contrib/mempattern.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/mempattern.h b/contrib/mempattern.h
index 4db147ae..7cb2bae8 100644
--- a/contrib/mempattern.h
+++ b/contrib/mempattern.h
@@ -81,7 +81,7 @@ static inline void mm_ctx_init_aligned(knot_mm_t *mm, size_t alignment)
{
assert(__builtin_popcount(alignment) == 1);
mm_ctx_init(mm);
- mm->ctx = (uint8_t *)NULL + alignment; /*< roundabout to satisfy linters */
+ mm->ctx = (void *)(uintptr_t)alignment; /*< roundabout to satisfy linters */
/* posix_memalign() doesn't allow alignment < sizeof(void*),
* and there's no point in using it for small values anyway,
* as plain malloc() guarantees at least max_align_t. */