summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/netstat.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-12-30 21:56:18 +0000
committerphk <phk@FreeBSD.org>2000-12-30 21:56:18 +0000
commitf2049d4440aeb04c6d2abff0d6e9760ea9da4699 (patch)
tree4a5e9c026462e2e7360d3fb30f7240d3636cb3df /usr.bin/systat/netstat.c
parentcc8f3da609f07ba92296f49c72052c564b0477d0 (diff)
downloadFreeBSD-src-f2049d4440aeb04c6d2abff0d6e9760ea9da4699.zip
FreeBSD-src-f2049d4440aeb04c6d2abff0d6e9760ea9da4699.tar.gz
My bad, committed the submitted patch rather than the fixed patch.
Diffstat (limited to 'usr.bin/systat/netstat.c')
-rw-r--r--usr.bin/systat/netstat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/systat/netstat.c b/usr.bin/systat/netstat.c
index 11158d7..85ee610 100644
--- a/usr.bin/systat/netstat.c
+++ b/usr.bin/systat/netstat.c
@@ -124,7 +124,7 @@ closenetstat(w)
endhostent();
endnetent();
- TAILQ_FOREACH(p, *netcb, chain) {
+ TAILQ_FOREACH(p, &netcb, chain) {
if (p->ni_line != -1)
lastrow--;
p->ni_line = -1;
@@ -191,6 +191,7 @@ again:
KREAD(off, &head, sizeof (struct inpcbhead));
LIST_FOREACH(next, &head, inp_list) {
KREAD(next, &inpcb, sizeof (inpcb));
+ next = &inpcb;
if (!aflag && inet_lnaof(inpcb.inp_laddr) == INADDR_ANY)
continue;
if (nhosts && !checkhost(&inpcb))
@@ -301,7 +302,7 @@ shownetstat()
q->ni_flags |= NIF_LACHG|NIF_FACHG;
}
lastrow--;
- q = TAILQ_PREV(p);
+ q = TAILQ_PREV(p, netinfohead, chain);
TAILQ_REMOVE(&netcb, p, chain);
free(p);
p = q;
OpenPOWER on IntegriCloud