diff options
author | Mattias Andrée <maandree@kth.se> | 2018-09-02 15:32:56 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-09-02 15:32:56 +0200 |
commit | 47128b7def4954c4cf544924c94f018d88033374 (patch) | |
tree | c75e6c76c078a095ff691d42a1f0b2d0ea0f0357 /envreallocn.c | |
parent | Add malloc function attribute were appropriate (diff) | |
download | libsimple-47128b7def4954c4cf544924c94f018d88033374.tar.gz libsimple-47128b7def4954c4cf544924c94f018d88033374.tar.bz2 libsimple-47128b7def4954c4cf544924c94f018d88033374.tar.xz |
misc
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'envreallocn.c')
-rw-r--r-- | envreallocn.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/envreallocn.c b/envreallocn.c index 571d077..03394a1 100644 --- a/envreallocn.c +++ b/envreallocn.c @@ -27,6 +27,7 @@ main(void) assert((info = get_allocinfo(ptr))); assert(info->size == 15); assert(!info->zeroed); + assert(!((uintptr_t)ptr % (uintptr_t)(info->alignment))); info->refcount += 1; } stpcpy(ptr, "test"); @@ -36,6 +37,7 @@ main(void) assert((info = get_allocinfo(ptr))); assert(info->size == 20); assert(!info->zeroed); + assert(!((uintptr_t)ptr % (uintptr_t)(info->alignment))); assert(ptr != old); free(old); } @@ -46,6 +48,7 @@ main(void) assert((info = get_allocinfo(ptr))); assert(info->size == 20); assert(!info->zeroed); + assert(!((uintptr_t)ptr % (uintptr_t)(info->alignment))); info->refcount += 1; } stpcpy(ptr, "test"); @@ -55,6 +58,7 @@ main(void) assert((info = get_allocinfo(ptr))); assert(info->size == 110); assert(!info->zeroed); + assert(!((uintptr_t)ptr % (uintptr_t)(info->alignment))); assert(ptr != old); free(old); } |