aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/sockstat
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2025-10-20 14:26:52 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2025-10-20 14:26:52 +0000
commit4ee0ddae1dab05dd8e3f273d861043c3e2919f23 (patch)
tree8608a421ea156420de2f4002540bee4e802405d0 /usr.bin/sockstat
parenta2838e818cfe5b150725776cc9ab45bb8f65c390 (diff)
Diffstat (limited to 'usr.bin/sockstat')
-rw-r--r--usr.bin/sockstat/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c
index d1ea6b1bc958..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);