]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Solaris: copy paste error in alignment check for aligned_alloc
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 5 Mar 2023 15:01:23 +0000 (16:01 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 5 Mar 2023 15:01:23 +0000 (16:01 +0100)
coregrind/m_replacemalloc/vg_replace_malloc.c

index 719d011410cbb757cc6b98147e734a8d9e93a1a9..09c1dccdb1de50e3143b28ed88f7d89a3dc306e8 100644 (file)
@@ -1981,8 +1981,8 @@ extern int *___errno (void) __attribute__((weak));
                 (ULong)alignment, (ULong)size ); \
        if (alignment == 0 \
            || (VG_ALIGNED_ALLOC_SIZE_MULTIPLE_ALIGN && (size % alignment != 0)) \
-           || (VG_ALIGNED_ALLOC_ALIGN_POWER_TWO &&  (alignment & (alignment - 1)) != 0) \
-           || (VG_ALIGNED_ALLOC_ALIGN_FACTOR_FOUR && (size % 4 != 0))) { \
+           || (VG_ALIGNED_ALLOC_ALIGN_POWER_TWO && (alignment & (alignment - 1)) != 0) \
+           || (VG_ALIGNED_ALLOC_ALIGN_FACTOR_FOUR && (alignment % 4 != 0))) { \
           SET_ERRNO_EINVAL; \
           return 0; \
        } \