summaryrefslogtreecommitdiff
path: root/tests/lib/cli/test_commands.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-05-11 15:32:06 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-06-06 16:15:34 +0000
commitfe011935cdeda14b61297e72bc30eae46ccd4f55 (patch)
treeca89a7f40f70a5e5477298d1555d127f94a8b46f /tests/lib/cli/test_commands.c
parenta86dc99646ba282f8e4fcfac180b3d6b706429bf (diff)
lib: add string utilities
I see lots of the same code being copy-pasted and slightly tweaked for string processing all over the codebase. Time to start aggregating these pieces into something consistent and correct. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'tests/lib/cli/test_commands.c')
-rw-r--r--tests/lib/cli/test_commands.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/cli/test_commands.c b/tests/lib/cli/test_commands.c
index 48dd99d28a..2a8d263175 100644
--- a/tests/lib/cli/test_commands.c
+++ b/tests/lib/cli/test_commands.c
@@ -130,7 +130,7 @@ static void test_load(void)
line[strlen(line) - 1] = '\0';
if (line[0] == '#')
continue;
- vector_set(test_cmds, XSTRDUP(MTYPE_STRVEC, line));
+ vector_set(test_cmds, XSTRDUP(MTYPE_TMP, line));
}
}
@@ -181,7 +181,7 @@ static void test_terminate(void)
vty_terminate();
for (i = 0; i < vector_active(test_cmds); i++)
- XFREE(MTYPE_STRVEC, vector_slot(test_cmds, i));
+ XFREE(MTYPE_TMP, vector_slot(test_cmds, i));
vector_free(test_cmds);
cmd_terminate();
}