summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/netcmds.c
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2001-03-23 03:58:25 +0000
committertmm <tmm@FreeBSD.org>2001-03-23 03:58:25 +0000
commitd6fecac748fdca2de8bbfd045bceab19277abab1 (patch)
tree62457bf2e3ef9a2f6fe6f055b531080c23af45c2 /usr.bin/systat/netcmds.c
parent76ba4861cd1cb43f58cdf0c32eafb5669114b1f0 (diff)
downloadFreeBSD-src-d6fecac748fdca2de8bbfd045bceab19277abab1.zip
FreeBSD-src-d6fecac748fdca2de8bbfd045bceab19277abab1.tar.gz
Get rid of setgid kmem for systat, and while being there, fix some bugs
and compiler warnings. The data for network statistics are still obtained via the kvm interface if systat was started with the needed privileges, otherwise sysctls are used. The reason for this is that with really many open sockets, the sysctl method is probably slower, but it systat -netstat is probably not really usable in either mode under these conditions. Approved by: rwatson
Diffstat (limited to 'usr.bin/systat/netcmds.c')
-rw-r--r--usr.bin/systat/netcmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/systat/netcmds.c b/usr.bin/systat/netcmds.c
index b5d0422..80a3213 100644
--- a/usr.bin/systat/netcmds.c
+++ b/usr.bin/systat/netcmds.c
@@ -253,7 +253,7 @@ showports()
for (p = ports; p < ports+nports; p++) {
sp = getservbyport(p->port,
- protos == TCP|UDP ? 0 : protos == TCP ? "tcp" : "udp");
+ protos == (TCP|UDP) ? 0 : protos == TCP ? "tcp" : "udp");
if (!p->onoff)
addch('!');
if (sp)
OpenPOWER on IntegriCloud