diff options
Diffstat (limited to 'usr.bin/sockstat/main.c')
-rw-r--r-- | usr.bin/sockstat/main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c index 7fedfd5b8724..abb73acafc2f 100644 --- a/usr.bin/sockstat/main.c +++ b/usr.bin/sockstat/main.c @@ -1196,7 +1196,9 @@ calculate_sock_column_widths(struct col_widths *cw, struct sock *s) first = true; len = strlen(s->protoname); - if (s->vflag & (INP_IPV4 | INP_IPV6)) + if (s->vflag & INP_IPV4) + len += 1; + if (s->vflag & INP_IPV6) len += 1; cw->proto = MAX(cw->proto, len); @@ -1789,9 +1791,11 @@ main(int argc, char *argv[]) argc = xo_parse_args(argc, argv); if (argc < 0) exit(1); - if (xo_get_style(NULL) != XO_STYLE_TEXT && - xo_get_style(NULL) != XO_STYLE_HTML) - is_xo_style_encoding = true; + if (xo_get_style(NULL) != XO_STYLE_TEXT) { + show_path_state = true; + if (xo_get_style(NULL) != XO_STYLE_HTML) + is_xo_style_encoding = true; + } opt_j = -1; while ((o = getopt(argc, argv, "46AbCcfIij:Llnp:P:qSsUuvw")) != -1) switch (o) { |