# HG changeset patch # User Sam Lantinga # Date 1258536515 0 # Node ID 1f1a41879fe47a24b96cf8c8b0e5c3fe418164ea # Parent a65f7b3a252467efc28e3f2795cf9cf80a7212ca Use SDL's string and memory functions instead of stdlib diff -r a65f7b3a2524 -r 1f1a41879fe4 test/automated/SDL_at.c --- a/test/automated/SDL_at.c Wed Nov 18 09:20:01 2009 +0000 +++ b/test/automated/SDL_at.c Wed Nov 18 09:28:35 2009 +0000 @@ -8,11 +8,10 @@ #include "SDL_at.h" +#include "SDL_stdinc.h" #include /* printf/fprintf */ #include /* va_list */ -#include /* strdup */ -#include /* free */ /* @@ -45,10 +44,10 @@ static void SDL_ATcleanup (void) { if (at_suite_msg != NULL) - free(at_suite_msg); + SDL_free(at_suite_msg); at_suite_msg = NULL; if (at_test_msg != NULL) - free(at_test_msg); + SDL_free(at_test_msg); at_test_msg = NULL; at_success = 0; at_failure = 0; @@ -70,7 +69,7 @@ SDL_ATprintErr( "AT testsuite does not have a name.\n"); } SDL_ATcleanup(); - at_suite_msg = strdup(suite); + at_suite_msg = SDL_strdup(suite); /* Verbose message. */ SDL_ATprintVerbose( 2, "--+---> Started Test Suite '%s'\n", at_suite_msg ); @@ -166,7 +165,7 @@ if (testcase == NULL) { SDL_ATprintErr( "AT testcase does not have a name.\n"); } - at_test_msg = strdup(testcase); + at_test_msg = SDL_strdup(testcase); /* Verbose message. */ SDL_ATprintVerbose( 2, " +---> StartedTest Case '%s'\n", testcase ); @@ -195,7 +194,7 @@ /* Clean up. */ if (at_test_msg != NULL) - free(at_test_msg); + SDL_free(at_test_msg); at_test_msg = NULL; }