From 3526b09903534c8e106c6957dc3c3848a243e171 Mon Sep 17 00:00:00 2001 From: daan Date: Sun, 23 Jun 2019 18:37:54 -0700 Subject: [PATCH] fix gcc warning --- src/alloc-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alloc-override.c b/src/alloc-override.c index 2e1723ab..03bb2a00 100644 --- a/src/alloc-override.c +++ b/src/alloc-override.c @@ -131,7 +131,7 @@ int posix_memalign(void** p, size_t alignment, size_t size) { // TODO: the spec says we should return EINVAL also if alignment is not a power of 2. // The spec also dictates we should not modify `*p` on an error. (issue#27) // - if (alignment % sizeof(void*) != 0 || p==NULL) return EINVAL; + if (alignment % sizeof(void*) != 0) return EINVAL; // no `p==NULL` check as it is declared as non-null void* q = mi_malloc_aligned(size, alignment); if (q==NULL && size != 0) return ENOMEM; *p = q;