=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/netstat.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- src/usr.bin/systat/netstat.c 2002/02/16 21:27:54 1.21 +++ src/usr.bin/systat/netstat.c 2002/06/18 00:46:47 1.22 @@ -1,4 +1,4 @@ -/* $OpenBSD: netstat.c,v 1.21 2002/02/16 21:27:54 millert Exp $ */ +/* $OpenBSD: netstat.c,v 1.22 2002/06/18 00:46:47 deraadt Exp $ */ /* $NetBSD: netstat.c,v 1.3 1995/06/18 23:53:07 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)netstat.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: netstat.c,v 1.21 2002/02/16 21:27:54 millert Exp $"; +static char rcsid[] = "$OpenBSD: netstat.c,v 1.22 2002/06/18 00:46:47 deraadt Exp $"; #endif /* not lint */ /* @@ -91,7 +91,7 @@ #define YMAX(w) ((w)->_maxy-1) WINDOW * -opennetstat() +opennetstat(void) { sethostent(1); setnetent(1); @@ -131,8 +131,7 @@ static int lastrow = 1; void -closenetstat(w) - WINDOW *w; +closenetstat(WINDOW *w) { struct netinfo *p; @@ -161,7 +160,7 @@ }; int -initnetstat() +initnetstat(void) { int ret; @@ -179,7 +178,7 @@ } void -fetchnetstat() +fetchnetstat(void) { struct inpcbtable pcbtable; struct inpcb *head, *prev, *next; @@ -211,7 +210,8 @@ while (next != head) { KREAD(next, &inpcb, sizeof (inpcb)); if (inpcb.inp_queue.cqe_prev != prev) { -printf("prev = %p, head = %p, next = %p, inpcb...prev = %p\n", prev, head, next, inpcb.inp_queue.cqe_prev); + printf("prev = %p, head = %p, next = %p, inpcb...prev = %p\n", + prev, head, next, inpcb.inp_queue.cqe_prev); p = netcb.nif_forw; for (; p != (struct netinfo *)&netcb; p = p->nif_forw) p->nif_seen = 1; @@ -255,11 +255,7 @@ } static void -enter(inp, so, state, proto) - struct inpcb *inp; - struct socket *so; - int state; - char *proto; +enter(struct inpcb *inp, struct socket *so, int state, char *proto) { struct netinfo *p; @@ -344,7 +340,7 @@ void -labelnetstat() +labelnetstat(void) { if (namelist[X_TCBTABLE].n_type == 0) return; @@ -358,7 +354,7 @@ } void -shownetstat() +shownetstat(void) { struct netinfo *p, *q; @@ -461,10 +457,7 @@ * If the nflag was specified, use numbers instead of names. */ static void -inetprint(in, port, proto) - struct in_addr *in; - int port; - char *proto; +inetprint(struct in_addr *in, int port, char *proto) { struct servent *sp = 0; char line[80], *cp; @@ -489,10 +482,7 @@ #ifdef INET6 static void -inet6print(in6, port, proto) - struct in6_addr *in6; - int port; - char *proto; +inet6print(struct in6_addr *in6, int port, char *proto) { struct servent *sp = 0; char line[80], *cp; @@ -522,8 +512,7 @@ * numeric value, otherwise try for symbolic name. */ static const char * -inetname(in) - struct in_addr in; +inetname(struct in_addr in) { char *cp = 0; static char line[50]; @@ -560,8 +549,7 @@ #ifdef INET6 static const char * -inet6name(in6) - struct in6_addr *in6; +inet6name(struct in6_addr *in6) { static char line[NI_MAXHOST]; struct sockaddr_in6 sin6; @@ -585,8 +573,7 @@ #endif int -cmdnetstat(cmd, args) - char *cmd, *args; +cmdnetstat(char *cmd, char *args) { struct netinfo *p;