summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-02-08 15:13:58 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2017-02-08 16:33:25 +0100
commitcaeb0a4f6561b1affd9a64b0129322d376a012de (patch)
tree7add135fd033fc52705340f4556dfde0004e8a5e /lib
parent93f6b7dbfe0c2548b13cb23094dc766abb042128 (diff)
lib: remove unused cmd_concat_strvec()
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/command.c21
-rw-r--r--lib/command.h1
2 files changed, 0 insertions, 22 deletions
diff --git a/lib/command.c b/lib/command.c
index 510699f91b..cd8f6463e2 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -294,27 +294,6 @@ cmd_free_strvec (vector v)
vector_free (v);
}
-char *
-cmd_concat_strvec (vector v)
-{
- size_t strsize = 0;
- for (unsigned int i = 0; i < vector_active (v); i++)
- if (vector_slot (v, i))
- strsize += strlen ((char *) vector_slot (v, i)) + 1;
-
- if (strsize == 0)
- return XSTRDUP (MTYPE_TMP, "");
-
- char *concatenated = calloc (sizeof (char), strsize);
- for (unsigned int i = 0; i < vector_active (v); i++)
- {
- strlcat (concatenated, (char *) vector_slot (v, i), strsize);
- strlcat (concatenated, " ", strsize);
- }
-
- return concatenated;
-}
-
/* Return prompt character of specified node. */
const char *
cmd_prompt (enum node_type node)
diff --git a/lib/command.h b/lib/command.h
index 8986703708..04bba9e412 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -410,7 +410,6 @@ extern int argv_find (struct cmd_token **argv, int argc, const char *text, int *
extern vector cmd_make_strvec (const char *);
extern void cmd_free_strvec (vector);
-extern char *cmd_concat_strvec (vector);
extern vector cmd_describe_command (vector, struct vty *, int *status);
extern char **cmd_complete_command (vector, struct vty *, int *status);
extern const char *cmd_prompt (enum node_type);