make sockstat not print wierd addresses on not connected unix domain sockets

Pointed out by:	rwatson
Reviewed by:	peter
This commit is contained in:
John-Mark Gurney 2003-07-19 06:23:56 +00:00
parent 7bbca4a4db
commit b4eb37c63d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117772

View File

@ -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)