diff options
Diffstat (limited to 'lib/libc/stdlib/aligned_alloc.c')
| -rw-r--r-- | lib/libc/stdlib/aligned_alloc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/stdlib/aligned_alloc.c b/lib/libc/stdlib/aligned_alloc.c index ab116333a43..8d4aad043b6 100644 --- a/lib/libc/stdlib/aligned_alloc.c +++ b/lib/libc/stdlib/aligned_alloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: aligned_alloc.c,v 1.1 2015/11/07 16:21:42 nros Exp $ */ +/* $NetBSD: aligned_alloc.c,v 1.2 2018/07/27 13:08:47 maya Exp $ */ /*- * Copyright (C) 2015 The NetBSD Foundation, Inc. @@ -42,11 +42,9 @@ aligned_alloc(size_t alignment, size_t size) int err; /* - * Check that alignment is a power of 2 - * and that size is an integer multiple of alignment. + * Check that alignment is a power of 2. */ - if (alignment == 0 || ((alignment - 1) & alignment) != 0 || - (size & (alignment-1)) != 0) { + if (alignment == 0 || ((alignment - 1) & alignment) != 0) { errno = EINVAL; return NULL; } |
