diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-05-26 00:49:53 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-06-06 18:16:12 +0200 |
commit | 62bece44494e5b7aefb5102bd1109e1e1376c3b3 (patch) | |
tree | e2096997453b0df42e27248de14f6de9248499ea /lib/command.c | |
parent | *: style for | support (diff) | |
download | frr-62bece44494e5b7aefb5102bd1109e1e1376c3b3.tar.xz frr-62bece44494e5b7aefb5102bd1109e1e1376c3b3.zip |
lib: add vector_remove() to vector.[ch]
An optimized version of this has already been implemented within graph.c
that assumes some specialized constraints for that code. It's generally
useful so this change implements a general purpose version of it.
This fixes cmd_make_strvec() that was broken by some code shuffling in
previous commits.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
-rw-r--r-- | lib/command.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c index ad0479dc9..3bd578cf0 100644 --- a/lib/command.c +++ b/lib/command.c @@ -290,7 +290,8 @@ vector cmd_make_strvec(const char *string) for (unsigned int i = 0; i < vector_active(result); i++) { if (strlen(vector_slot(result, i)) == 0) { XFREE(MTYPE_TMP, vector_slot(result, i)); - vector_unset(result, i); + vector_remove(result, i); + --i; } } return result; |