diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-05-11 21:32:06 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-06-06 18:15:34 +0200 |
commit | fe011935cdeda14b61297e72bc30eae46ccd4f55 (patch) | |
tree | ca89a7f40f70a5e5477298d1555d127f94a8b46f /tests/lib | |
parent | Merge pull request #2376 from mjstapp/doc_link (diff) | |
download | frr-fe011935cdeda14b61297e72bc30eae46ccd4f55.tar.xz frr-fe011935cdeda14b61297e72bc30eae46ccd4f55.zip |
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')
-rw-r--r-- | tests/lib/cli/test_commands.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/cli/test_commands.c b/tests/lib/cli/test_commands.c index 48dd99d28..2a8d26317 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(); } |