aboutsummaryrefslogtreecommitdiffstats
path: root/enstrndup.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-09-02 15:32:56 +0200
committerMattias Andrée <maandree@kth.se>2018-09-02 15:32:56 +0200
commit47128b7def4954c4cf544924c94f018d88033374 (patch)
treec75e6c76c078a095ff691d42a1f0b2d0ea0f0357 /enstrndup.c
parentAdd malloc function attribute were appropriate (diff)
downloadlibsimple-47128b7def4954c4cf544924c94f018d88033374.tar.gz
libsimple-47128b7def4954c4cf544924c94f018d88033374.tar.bz2
libsimple-47128b7def4954c4cf544924c94f018d88033374.tar.xz
misc
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'enstrndup.c')
-rw-r--r--enstrndup.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/enstrndup.c b/enstrndup.c
index a6bc7b3..c02c0fd 100644
--- a/enstrndup.c
+++ b/enstrndup.c
@@ -26,6 +26,7 @@ main(void)
if (have_custom_malloc()) {
assert((info = get_allocinfo(s)));
assert(info->size == 6);
+ assert(info->alignment == 1);
assert(!info->zeroed);
}
assert(!strcmp(s, "hello"));
@@ -35,6 +36,7 @@ main(void)
if (have_custom_malloc()) {
assert((info = get_allocinfo(s)));
assert(info->size == 5);
+ assert(info->alignment == 1);
assert(!info->zeroed);
}
assert(!strcmp(s, "test"));
@@ -44,6 +46,7 @@ main(void)
if (have_custom_malloc()) {
assert((info = get_allocinfo(s)));
assert(info->size == 3);
+ assert(info->alignment == 1);
assert(!info->zeroed);
}
assert(!strcmp(s, "he"));
@@ -53,6 +56,7 @@ main(void)
if (have_custom_malloc()) {
assert((info = get_allocinfo(s)));
assert(info->size == 4);
+ assert(info->alignment == 1);
assert(!info->zeroed);
}
assert(!strcmp(s, "tes"));
@@ -62,6 +66,7 @@ main(void)
if (have_custom_malloc()) {
assert((info = get_allocinfo(s)));
assert(info->size == 1);
+ assert(info->alignment == 1);
assert(!info->zeroed);
}
assert(!strcmp(s, ""));
@@ -71,6 +76,7 @@ main(void)
if (have_custom_malloc()) {
assert((info = get_allocinfo(s)));
assert(info->size == 1);
+ assert(info->alignment == 1);
assert(!info->zeroed);
}
assert(!strcmp(s, ""));