From 643d352eb2008a4d8d09b143c684e4be7a22da26 Mon Sep 17 00:00:00 2001 From: "David M. Syzdek" Date: Wed, 9 Mar 2022 14:01:02 -0900 Subject: tests: auditing code and replacing strdup() with tinyrad_strdup() --- tests/test-array-queue.c | 2 +- tests/test-array-sorted.c | 2 +- tests/test-array-stack.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test-array-queue.c b/tests/test-array-queue.c index 3f06021..d95c13f 100644 --- a/tests/test-array-queue.c +++ b/tests/test-array-queue.c @@ -217,7 +217,7 @@ int main( int argc, char * argv[] ) { data[pos].value = (int)(~pos); data[pos].opts = (int)pos; - data[pos].name = (pos < len) ? strdup(test_strs[pos]) : trutils_strrand(8, 8); + data[pos].name = (pos < len) ? tinyrad_strdup(test_strs[pos]) : trutils_strrand(8, 8); if (!(data[pos].name)) { for(; (pos > 0); pos--) diff --git a/tests/test-array-sorted.c b/tests/test-array-sorted.c index 445f240..b1c4a9b 100644 --- a/tests/test-array-sorted.c +++ b/tests/test-array-sorted.c @@ -287,7 +287,7 @@ int main( int argc, char * argv[] ) { data[pos].value = (int)(~pos); data[pos].opts = (int)pos; - data[pos].name = (pos < len) ? strdup(test_strs[pos]) : trutils_strrand(8, 8); + data[pos].name = (pos < len) ? tinyrad_strdup(test_strs[pos]) : trutils_strrand(8, 8); if (!(data[pos].name)) { for(; (pos > 0); pos--) diff --git a/tests/test-array-stack.c b/tests/test-array-stack.c index 9d94da6..e73e4e8 100644 --- a/tests/test-array-stack.c +++ b/tests/test-array-stack.c @@ -217,7 +217,7 @@ int main( int argc, char * argv[] ) { data[pos].value = (int)(~pos); data[pos].opts = (int)pos; - data[pos].name = (pos < len) ? strdup(test_strs[pos]) : trutils_strrand(8, 8); + data[pos].name = (pos < len) ? tinyrad_strdup(test_strs[pos]) : trutils_strrand(8, 8); if (!(data[pos].name)) { for(; (pos > 0); pos--) -- cgit v1.2.3