diff options
-rw-r--r-- | lib/hash.c | 15 | ||||
-rw-r--r-- | vtysh/vtysh.c | 16 |
2 files changed, 14 insertions, 17 deletions
diff --git a/lib/hash.c b/lib/hash.c index 57cc87be1..95643bbae 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -458,22 +458,21 @@ DEFUN(show_hash_stats, char underln[sizeof(header) + strlen(frr_protonameinst)]; memset (underln, '-', sizeof(underln)); underln[sizeof(underln) - 1] = '\0'; - vty_out (vty, "%s%s%s", header, frr_protonameinst, VTY_NEWLINE); - vty_out (vty, "%s%s", underln, VTY_NEWLINE); + vty_outln (vty, "%s%s", header, frr_protonameinst); + vty_outln (vty, "%s", underln); - vty_out (vty, "# allocated: %d%s", _hashes->count, VTY_NEWLINE); - vty_out (vty, "# named: %d%s%s", tt->nrows - 1, VTY_NEWLINE, - VTY_NEWLINE); + vty_outln (vty, "# allocated: %d", _hashes->count); + vty_outln (vty, "# named: %d%s", tt->nrows - 1, VTYNL); if (tt->nrows > 1) { ttable_colseps (tt, 0, RIGHT, true, '|'); - char *table = ttable_dump (tt, VTY_NEWLINE); - vty_out (vty, "%s%s", table, VTY_NEWLINE); + char *table = ttable_dump (tt, VTYNL); + vty_out (vty, "%s%s", table, VTYNL); XFREE (MTYPE_TMP, table); } else - vty_out (vty, "No named hash tables to display.%s", VTY_NEWLINE); + vty_outln (vty, "No named hash tables to display."); ttable_del (tt); diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index d95a2d286..0e04f4bf8 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -2114,15 +2114,13 @@ DEFUN (vtysh_show_hashtable, unsigned long i; int ret = CMD_SUCCESS; - vty_out (vty, "%sLoad factor (LF) - average number of elements across all " - "buckets%s", VTY_NEWLINE, VTY_NEWLINE); - vty_out (vty, "Full load factor (FLF) - average number of elements " - "across full buckets%s%s", VTY_NEWLINE, VTY_NEWLINE); - - vty_out (vty, "Standard deviation (SD) is calculated for both the LF and FLF%s", VTY_NEWLINE); - vty_out (vty, "and indicates the typical deviation of bucket chain length%s", VTY_NEWLINE); - vty_out (vty, "from the value in the corresponding load factor.%s%s", - VTY_NEWLINE, VTY_NEWLINE); + fprintf (stdout, "\n"); + fprintf (stdout, "Load factor (LF) - average number of elements across all buckets\n"); + fprintf (stdout, "Full load factor (FLF) - average number of elements across full buckets\n\n"); + + fprintf (stdout, "Standard deviation (SD) is calculated for both the LF and FLF\n"); + fprintf (stdout, "and indicates the typical deviation of bucket chain length\n"); + fprintf (stdout, "from the value in the corresponding load factor.\n\n"); for (i = 0; i < array_size(vtysh_client); i++) if ( vtysh_client[i].fd >= 0 ) { |