about summary refs log tree commit diff
path: root/src/malloc/memalign.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/malloc/memalign.c')
-rw-r--r--src/malloc/memalign.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/malloc/memalign.c b/src/malloc/memalign.c
index 61f456e4..a594c636 100644
--- a/src/malloc/memalign.c
+++ b/src/malloc/memalign.c
@@ -3,11 +3,5 @@
 
 void *memalign(size_t align, size_t len)
 {
-	void *mem;
-	int ret;
-	if ((ret = posix_memalign(&mem, align, len))) {
-		errno = ret;
-		return 0;
-	}
-	return mem;
+	return aligned_alloc(align, len);
 }