diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-10-22 08:07:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-22 08:07:57 -0400 |
| commit | 84de5a245a3eb17619588a535b9f408ce802a8c9 (patch) | |
| tree | 30eafbdeaf55a170d2bf8d7be0c1b1f34cfc4f90 /tests/lib/cli/test_cli.c | |
| parent | e58496183e278767da2cb0886f90397e50cfa5ef (diff) | |
| parent | 2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1 (diff) | |
Merge pull request #7343 from ton31337/fix/prefix2str_to_pFX
:* Convert prefix2str to %pFX
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; } |
