|
From: Dirk M. <mu...@kd...> - 2003-11-28 00:16:31
|
CVS commit by mueller:
fix alignment checking of __posix_memalign. merging to stable.
M +2 -2 vg_replace_malloc.c 1.15
--- valgrind/coregrind/vg_replace_malloc.c #1.14:1.15
@@ -276,7 +276,7 @@ int __posix_memalign ( void **memptr, UI
void *mem;
- /* Test whether the SIZE argument is valid. It must be a power of
+ /* Test whether the alignment argument is valid. It must be a power of
two multiple of sizeof (void *). */
- if (size % sizeof (void *) != 0 || (size & (size - 1)) != 0)
+ if (alignment % sizeof (void *) != 0 || (alignment & (alignment - 1)) != 0)
return VKI_EINVAL /*22*/ /*EINVAL*/;
|