diff options
Diffstat (limited to 'test/scudo')
-rw-r--r-- | test/scudo/memalign.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/scudo/memalign.cpp b/test/scudo/memalign.cpp index 856128f24..82c54af8b 100644 --- a/test/scudo/memalign.cpp +++ b/test/scudo/memalign.cpp @@ -65,15 +65,15 @@ int main(int argc, char **argv) // Size is not a multiple of alignment. p = aligned_alloc(alignment, size >> 1); assert(!p); - p = (void *)0x42UL; + void *p_unchanged = (void *)0x42UL; + p = p_unchanged; // Alignment is not a power of 2. err = posix_memalign(&p, 3, size); - assert(!p); + assert(p == p_unchanged); assert(err == EINVAL); - p = (void *)0x42UL; // Alignment is a power of 2, but not a multiple of size(void *). err = posix_memalign(&p, 2, size); - assert(!p); + assert(p == p_unchanged); assert(err == EINVAL); } return 0; |