Skip to content

Commit

Permalink
2014-12-11 Steve Ellcey <sellcey@imgtec.com>
Browse files Browse the repository at this point in the history
	* malloc/malloc.c: Fix powerof2 check.
  • Loading branch information
Steve Ellcey committed Dec 11, 2014
1 parent 40e5391 commit fc56e97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2014-12-11 Steve Ellcey <sellcey@imgtec.com>

* malloc/malloc.c: Fix powerof2 check.

2014-12-11 Stefan Liebler <stli@linux.vnet.ibm.com>

* locale/programs/locfile.h (maybe_swap_uint32):
Expand Down
2 changes: 1 addition & 1 deletion malloc/malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fc56e97

Please sign in to comment.