From e97a8f1bb5fbb72a7aba41985727d01d65f488c2 Mon Sep 17 00:00:00 2001 From: charnier Date: Tue, 29 Jul 1997 06:51:41 +0000 Subject: Remove prog, unused variables. Cosmetic in usage string. --- usr.bin/netstat/atalk.c | 4 +--- usr.bin/netstat/ipx.c | 3 +-- usr.bin/netstat/main.c | 28 +++++++++++----------------- usr.bin/netstat/mbuf.c | 5 +++++ usr.bin/netstat/netstat.h | 3 --- usr.bin/netstat/route.c | 6 +----- usr.bin/netstat/unix.c | 4 ++++ 7 files changed, 23 insertions(+), 30 deletions(-) (limited to 'usr.bin/netstat') diff --git a/usr.bin/netstat/atalk.c b/usr.bin/netstat/atalk.c index e1fe34d..6308e73 100644 --- a/usr.bin/netstat/atalk.c +++ b/usr.bin/netstat/atalk.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)atalk.c 1.1 (Whistle) 6/6/96"; */ static const char rcsid[] = - "$Id$"; + "$Id: atalk.c,v 1.9 1997/02/22 19:56:20 peter Exp $"; #endif /* not lint */ #include @@ -59,8 +59,6 @@ static const char rcsid[] = struct ddpcb ddpcb; struct socket sockb; -static void atalk_erputil __P((int, int)); - static int first = 1; /* diff --git a/usr.bin/netstat/ipx.c b/usr.bin/netstat/ipx.c index 0e8d34f..d68eae9 100644 --- a/usr.bin/netstat/ipx.c +++ b/usr.bin/netstat/ipx.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)ns.c 8.1 (Berkeley) 6/6/93"; */ static const char rcsid[] = - "$Id: ipx.c,v 1.7 1997/02/22 19:56:22 peter Exp $"; + "$Id: ipx.c,v 1.8 1997/05/10 10:03:41 jhay Exp $"; #endif /* not lint */ #include @@ -72,7 +72,6 @@ struct spxpcb spxpcb; struct socket sockb; static char *ipx_prpr __P((struct ipx_addr *)); -static void ipx_erputil __P((int, int)); static int first = 1; diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 08e15ee..c9e7c42 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -32,13 +32,17 @@ */ #ifndef lint -char copyright[] = +char const copyright[] = "@(#) Copyright (c) 1983, 1988, 1993\n\ Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint +#if 0 static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include @@ -49,6 +53,7 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; #include #include +#include #include #include #include @@ -59,7 +64,6 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; #include #include #include -#include #include "netstat.h" struct nlist nl[] = { @@ -231,19 +235,12 @@ main(argc, argv) int argc; char *argv[]; { - extern char *optarg; - 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]; - if ((cp = rindex(argv[0], '/'))) - prog = cp + 1; - else - prog = argv[0]; af = AF_UNSPEC; while ((ch = getopt(argc, argv, "Aabdf:ghI:iM:mN:np:rstuw:")) != -1) @@ -569,14 +566,11 @@ name2protox(name) static void usage() { - (void)fprintf(stderr, -"usage: %s [-Aan] [-f address_family] [-M core] [-N system]\n", prog); - (void)fprintf(stderr, -" %s [-bdghimnrs] [-f address_family] [-M core] [-N system]\n", prog); - (void)fprintf(stderr, -" %s [-bdn] [-I interface] [-M core] [-N system] [-w wait]\n", prog); - (void)fprintf(stderr, -" %s [-M core] [-N system] [-p protocol]\n", prog); + (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", +"usage: netstat [-Aan] [-f address_family] [-M core] [-N system]", +" netstat [-bdghimnrs] [-f address_family] [-M core] [-N system]", +" netstat [-bdn] [-I interface] [-M core] [-N system] [-w wait]", +" netstat [-M core] [-N system] [-p protocol]"); exit(1); } diff --git a/usr.bin/netstat/mbuf.c b/usr.bin/netstat/mbuf.c index cfefa5e..b80b5f5 100644 --- a/usr.bin/netstat/mbuf.c +++ b/usr.bin/netstat/mbuf.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)mbuf.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include @@ -41,6 +45,7 @@ static char sccsid[] = "@(#)mbuf.c 8.1 (Berkeley) 6/6/93"; #include #include +#include #include #include "netstat.h" diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h index 708094f..30e049c 100644 --- a/usr.bin/netstat/netstat.h +++ b/usr.bin/netstat/netstat.h @@ -55,9 +55,6 @@ int unit; /* unit number for above */ int af; /* address family */ -char *prog; /* program name */ - - int kread __P((u_long addr, char *buf, int size)); char *plural __P((int)); char *plurales __P((int)); diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index e920aaa..6eb7b21 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -36,7 +36,7 @@ static char sccsid[] = "From: @(#)route.c 8.6 (Berkeley) 4/28/95"; #endif static const char rcsid[] = - "$Id: route.c,v 1.26 1997/05/10 10:03:43 jhay Exp $"; + "$Id: route.c,v 1.27 1997/05/25 08:36:20 phk Exp $"; #endif /* not lint */ #include @@ -636,7 +636,6 @@ netname(in, mask) struct netent *np = 0; u_long net, omask, dmask; register u_long i; - int subnetshift; i = ntohl(in); omask = mask; @@ -697,8 +696,6 @@ ipx_print(sa) register struct sockaddr *sa; { u_short port; - struct netent *np = 0; - struct hostent *hp = 0; struct servent *sp = 0; char *net = "", *host = ""; register char *p; register u_char *q; @@ -765,7 +762,6 @@ ipx_phost(sa) static union ipx_net ipx_zeronet; char *p; struct ipx_addr in; - struct hostent *hp; work = *sipx; in = work.sipx_addr; diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c index 0309d1c..a37da93 100644 --- a/usr.bin/netstat/unix.c +++ b/usr.bin/netstat/unix.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)unix.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ /* -- cgit v1.1