aboutsummaryrefslogtreecommitdiff
path: root/malloc/malloc.c
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@mips.com>2014-12-11 08:14:17 -0800
committerSteve Ellcey <sellcey@mips.com>2014-12-11 08:14:17 -0800
commitfc56e970934d9e936108240f3dc05e5e131f5772 (patch)
treeb1542f87d150c31bba2ed5781cfc2fb275c692b8 /malloc/malloc.c
parent40e53917ea9e92ac14ada7bf177f419e5c0855ef (diff)
downloadglibc-fc56e970934d9e936108240f3dc05e5e131f5772.tar
glibc-fc56e970934d9e936108240f3dc05e5e131f5772.tar.gz
glibc-fc56e970934d9e936108240f3dc05e5e131f5772.tar.bz2
glibc-fc56e970934d9e936108240f3dc05e5e131f5772.zip
2014-12-11 Steve Ellcey <sellcey@imgtec.com>
* malloc/malloc.c: Fix powerof2 check.
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r--malloc/malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 6bfb8593ad..cb91b97da4 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4973,7 +4973,7 @@ __posix_memalign (void **memptr, size_t alignment, size_t size)
/* Test whether the SIZE argument is valid. It must be a power of
two multiple of sizeof (void *). */
if (alignment % sizeof (void *) != 0
- || !powerof2 (alignment / sizeof (void *)) != 0
+ || !powerof2 (alignment / sizeof (void *))
|| alignment == 0)
return EINVAL;