diff options
Diffstat (limited to 'usr.bin/sockstat')
-rw-r--r-- | usr.bin/sockstat/sockstat.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index b68906e..eaeb242 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -540,8 +540,12 @@ display(void) break; } /* client */ - pos += xprintf("-> "); p = *(void **)&s->faddr; + if (p == NULL) { + pos += xprintf("(not connected)"); + break; + } + pos += xprintf("-> "); for (hash = 0; hash < HASHSIZE; ++hash) { for (s = sockhash[hash]; s != NULL; s = s->next) if (s->pcb == p) |