diff options
Diffstat (limited to 'string/testcopy.c')
-rw-r--r-- | string/testcopy.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/string/testcopy.c b/string/testcopy.c index 61ede1c..f14917b 100644 --- a/string/testcopy.c +++ b/string/testcopy.c @@ -19,10 +19,10 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#include <malloc.h> +#include <support/support.h> -int -main (void) +static int +do_test (void) { char *mem, *memp; char *rand_mem; @@ -34,10 +34,10 @@ main (void) max_size = 256; - mem = malloc (max_size + 2 * max_size + 2 * space_around); - rand_mem = malloc (max_size); - lo_around = malloc (space_around); - hi_around = malloc (space_around); + mem = xmalloc (max_size + 2 * max_size + 2 * space_around); + rand_mem = xmalloc (max_size); + lo_around = xmalloc (space_around); + hi_around = xmalloc (space_around); memp = mem + space_around; /* Fill RAND_MEM with random bytes, each non-zero. */ @@ -105,3 +105,5 @@ main (void) return 0; } + +#include <support/test-driver.c> |