aboutsummaryrefslogtreecommitdiff
path: root/tests/sw_tree1.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sw_tree1.c')
-rw-r--r--tests/sw_tree1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sw_tree1.c b/tests/sw_tree1.c
index 6d4c531..4887dc3 100644
--- a/tests/sw_tree1.c
+++ b/tests/sw_tree1.c
@@ -42,14 +42,14 @@ static void realloc_fdt(void **fdt, size_t *size, bool created)
switch (alloc_mode) {
case FIXED:
if (!(*fdt))
- fdt = xmalloc(*size);
+ *fdt = xmalloc(*size);
else
FAIL("Ran out of space");
return;
case RESIZE:
if (!(*fdt)) {
- fdt = xmalloc(SPACE);
+ *fdt = xmalloc(SPACE);
} else if (*size < SPACE) {
*size += 1;
fdt_resize(*fdt, *fdt, *size);