diff options
Diffstat (limited to 'tests/lib/cli/test_cli.c')
| -rw-r--r-- | tests/lib/cli/test_cli.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/lib/cli/test_cli.c b/tests/lib/cli/test_cli.c index 8f062d8b5e..8dba1e29f0 100644 --- a/tests/lib/cli/test_cli.c +++ b/tests/lib/cli/test_cli.c @@ -47,12 +47,10 @@ DEFPY(magic_test, magic_test_cmd, "magic (0-100) {ipv4net A.B.C.D/M|X:X::X:X$ipv6}", "1\n2\n3\n4\n5\n") { - char buf[256]; vty_out(vty, "def: %s\n", self->string); vty_out(vty, "num: %ld\n", magic); - vty_out(vty, "ipv4: %s\n", prefix2str(ipv4net, buf, sizeof(buf))); - vty_out(vty, "ipv6: %s\n", - inet_ntop(AF_INET6, &ipv6, buf, sizeof(buf))); + vty_out(vty, "ipv4: %pFX\n", ipv4net); + vty_out(vty, "ipv6: %pI6\n", &ipv6); return CMD_SUCCESS; } |
