Clean up many strdups

This commit is contained in:
2022-11-02 20:36:07 -04:00
parent 9c1a81811c
commit 3b7bef779b
11 changed files with 39 additions and 31 deletions

View File

@@ -73,7 +73,7 @@ static void test_cdr_t(void) {
static void test_car_list(void) {
input = ucl_tuple_create(
ucl_string_create(strdup("foo")),
ucl_string_create("foo"),
ucl_t_create());
response = ucl_car(input);
@@ -83,7 +83,7 @@ static void test_car_list(void) {
static void test_cdr_list(void) {
input = ucl_tuple_create(
ucl_t_create(),
ucl_string_create(strdup("foo")));
ucl_string_create("foo"));
response = ucl_cdr(input);
TEST_ASSERT_OBJ_STRING(ucl_car(response));
@@ -146,7 +146,7 @@ static void test_list_nth_list_0() {
response = ucl_list_nth(
ucl_tuple_create(
ucl_t_create(),
ucl_string_create(strdup("foo"))),
ucl_string_create("foo")),
0);
TEST_ASSERT_T(response);
@@ -156,7 +156,7 @@ static void test_list_nth_list_1() {
response = ucl_list_nth(
ucl_tuple_create(
ucl_t_create(),
ucl_string_create(strdup("foo"))),
ucl_string_create("foo")),
1);
TEST_ASSERT_OBJ_STRING(response);