blob: 246042b6d86e5cdbd6bf5d6a058e34e1a029683f [file]
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(void) {
char* p = calloc(4, sizeof(char));
assert(p);
strcpy(p, "foo");
puts(p);
p = reallocarray(p, 32, sizeof(char));
assert(p);
strcpy(p, "foobar");
puts(p);
free(p);
return 0;
}