=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/netstat/main.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/netstat/main.c 1997/06/18 01:52:27 1.10 --- src/usr.bin/netstat/main.c 1997/06/29 20:18:01 1.11 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.10 1997/06/18 01:52:27 angelos Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.11 1997/06/29 20:18:01 millert Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* *************** *** 44,50 **** #if 0 static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94"; #else ! static char *rcsid = "$OpenBSD: main.c,v 1.10 1997/06/18 01:52:27 angelos Exp $"; #endif #endif /* not lint */ --- 44,50 ---- #if 0 static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94"; #else ! static char *rcsid = "$OpenBSD: main.c,v 1.11 1997/06/29 20:18:01 millert Exp $"; #endif #endif /* not lint */ *************** *** 147,153 **** { "_espstat"}, #define N_IP4STAT 38 { "_ip4stat"}, ! "", }; struct protox { --- 147,153 ---- { "_espstat"}, #define N_IP4STAT 38 { "_ip4stat"}, ! { ""}, }; struct protox { *************** *** 231,237 **** extern int optind; register struct protoent *p; register struct protox *tp; /* for printing cblocks & stats */ - register char *cp; int ch; char *nlistf = NULL, *memf = NULL; char buf[_POSIX2_LINE_MAX]; --- 231,236 ---- *************** *** 409,415 **** setprotoent(1); setservent(1); /* ugh, this is O(MN) ... why do we do this? */ ! while (p = getprotoent()) { for (tp = protox; tp->pr_name; tp++) if (strcmp(tp->pr_name, p->p_name) == 0) break; --- 408,414 ---- setprotoent(1); setservent(1); /* ugh, this is O(MN) ... why do we do this? */ ! while ((p = getprotoent())) { for (tp = protox; tp->pr_name; tp++) if (strcmp(tp->pr_name, p->p_name) == 0) break; *************** *** 520,530 **** * Try to find the name in the list of "well-known" names. If that * fails, check if name is an alias for an Internet protocol. */ ! if (tp = knownname(name)) return (tp); setprotoent(1); /* make protocol lookup cheaper */ ! while (p = getprotoent()) { /* assert: name not same as p->name */ for (alias = p->p_aliases; *alias; alias++) if (strcmp(name, *alias) == 0) { --- 519,529 ---- * Try to find the name in the list of "well-known" names. If that * fails, check if name is an alias for an Internet protocol. */ ! if ((tp = knownname(name))) return (tp); setprotoent(1); /* make protocol lookup cheaper */ ! while ((p = getprotoent())) { /* assert: name not same as p->name */ for (alias = p->p_aliases; *alias; alias++) if (strcmp(name, *alias) == 0) {