musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
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.c 8
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);
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月07日 19:21:19 +0000

AltStyle によって変換されたページ (->オリジナル) /