summaryrefslogtreecommitdiff
path: root/tests/common-cli.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-01-26 21:57:46 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2017-01-31 15:28:39 +0100
commitbff9c3e9d3270a524eee693f4d44cd83f13e9963 (patch)
tree26f6e76ab0228fdda33e5a438d7b50e27fa91bae /tests/common-cli.c
parent0d9e204694fbdff2ad6c8441ba3008907ddec3db (diff)
lib/tests: add cmd_hostname_set()
To make it possible for testcli to get a clean memory management bill. (Note: XFREE() is NULL-safe, just like free().) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tests/common-cli.c')
-rw-r--r--tests/common-cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/common-cli.c b/tests/common-cli.c
index dc1f052bc2..7f7d253e6c 100644
--- a/tests/common-cli.c
+++ b/tests/common-cli.c
@@ -72,7 +72,7 @@ main (int argc, char **argv)
/* Library inits. */
cmd_init (1);
- host.name = XSTRDUP(MTYPE_HOST,"test");
+ cmd_hostname_set ("test");
vty_init (master);
memory_init ();