diff options
author | David Robillard <d@drobilla.net> | 2022-10-14 14:18:36 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-10-18 13:20:18 -0400 |
commit | 516c82ec91ee07de55357e910d93a55eb3d01891 (patch) | |
tree | 9729009a5f6efb834634f641ac4a3f21296a55ea | |
parent | 83d1c67859ced623a64fafc0c63f621fe37c4407 (diff) | |
download | zix-516c82ec91ee07de55357e910d93a55eb3d01891.tar.gz zix-516c82ec91ee07de55357e910d93a55eb3d01891.tar.bz2 zix-516c82ec91ee07de55357e910d93a55eb3d01891.zip |
Fix unused return value warning
Kind of annoying since this adds an untested branch, but oh well.
-rw-r--r-- | src/allocator.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/allocator.c b/src/allocator.c index af6b8a9..1da1ec5 100644 --- a/src/allocator.c +++ b/src/allocator.c @@ -60,10 +60,8 @@ zix_default_aligned_alloc(ZixAllocator* const allocator, #if defined(_WIN32) return _aligned_malloc(size, alignment); #elif USE_POSIX_MEMALIGN - // POSIX.1-2008 TC2 says that ptr is not modified on failure void* ptr = NULL; - posix_memalign(&ptr, alignment, size); - return ptr; + return posix_memalign(&ptr, alignment, size) ? NULL : ptr; #else return NULL; #endif |