diff options
author | alex <alex@FreeBSD.org> | 1996-06-02 23:19:12 +0000 |
---|---|---|
committer | alex <alex@FreeBSD.org> | 1996-06-02 23:19:12 +0000 |
commit | 5c1e86ebb424294fcfae39ae7ff1efcf8808086d (patch) | |
tree | a562c2f6b0b887d7adcf7d867066326bca326e2e /usr.bin/netstat/unix.c | |
parent | 256d4f51af66d46915508a783071de1a6b139187 (diff) | |
download | FreeBSD-src-5c1e86ebb424294fcfae39ae7ff1efcf8808086d.zip FreeBSD-src-5c1e86ebb424294fcfae39ae7ff1efcf8808086d.tar.gz |
Code cleanup: remove unused variables, use correct *printf format
specifiers (some unsigned values were printed as signed, some longs
were printed as ints), and place parentheses around assignments in
if statements.
Diffstat (limited to 'usr.bin/netstat/unix.c')
-rw-r--r-- | usr.bin/netstat/unix.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c index 4095e1b..0309d1c 100644 --- a/usr.bin/netstat/unix.c +++ b/usr.bin/netstat/unix.c @@ -103,7 +103,7 @@ unixdomainpr(so, soaddr) { struct unpcb unpcb, *unp = &unpcb; struct mbuf mbuf, *m; - struct sockaddr_un *sa; + struct sockaddr_un *sa = NULL; static int first = 1; if (kread((u_long)so->so_pcb, (char *)unp, sizeof (*unp))) @@ -123,10 +123,10 @@ unixdomainpr(so, soaddr) "Inode", "Conn", "Refs", "Nextref"); first = 0; } - printf("%8x %-6.6s %6d %6d %8x %8x %8x %8x", - soaddr, socktype[so->so_type], so->so_rcv.sb_cc, so->so_snd.sb_cc, - unp->unp_vnode, unp->unp_conn, - unp->unp_refs, unp->unp_nextref); + printf("%8x %-6.6s %6ld %6ld %8x %8x %8x %8x", + (int)soaddr, socktype[so->so_type], so->so_rcv.sb_cc, so->so_snd.sb_cc, + (int)unp->unp_vnode, (int)unp->unp_conn, + (int)unp->unp_refs, (int)unp->unp_nextref); if (m) printf(" %.*s", m->m_len - (int)(sizeof(*sa) - sizeof(sa->sun_path)), |