diff options
Diffstat (limited to 'test/testframe.c')
-rw-r--r-- | test/testframe.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/testframe.c b/test/testframe.c index ea5cc18..cd2947b 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -74,11 +74,11 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const if (HDstrlen(TheDescr) >= MAXTESTDESC) { printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC); HDexit(EXIT_FAILURE); - } /* end if */ + } if (HDstrlen(TheName) >= MAXTESTNAME) { printf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME); HDexit(EXIT_FAILURE); - } /* end if */ + } /* Check for increasing the Test array size */ if (Index >= TestAlloc) { @@ -86,16 +86,16 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const unsigned newAlloc = MAX(1, TestAlloc * 2); /* New array size */ /* Reallocate array */ - if (NULL == (newTest = (TestStruct *)HDrealloc(Test, newAlloc * sizeof(TestStruct)))) { + if (NULL == (newTest = (TestStruct *)realloc(Test, newAlloc * sizeof(TestStruct)))) { printf("Out of memory for tests, Index = %u, TestAlloc = %u, newAlloc = %u\n", Index, TestAlloc, newAlloc); HDexit(EXIT_FAILURE); - } /* end if */ + } /* Update info */ Test = newTest; TestAlloc = newAlloc; - } /* end if */ + } /* Set up test function */ HDstrcpy(Test[Index].Description, TheDescr); @@ -378,7 +378,7 @@ void TestShutdown(void) { if (Test) - HDfree(Test); + free(Test); } /* |