aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/netstat
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>1997-07-29 06:51:41 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>1997-07-29 06:51:41 +0000
commit5d422d6aa7ca44f14b10cb4be7dd0118deb6b606 (patch)
treee2d9fa493bc5ff3f4b96d3243e82c109f85e79d8 /usr.bin/netstat
parentff456ca43970dd375d8870ddd806fba3372fec96 (diff)
downloadsrc-5d422d6aa7ca44f14b10cb4be7dd0118deb6b606.tar.gz
src-5d422d6aa7ca44f14b10cb4be7dd0118deb6b606.zip
Remove prog, unused variables.
Cosmetic in usage string.
Notes
Notes: svn path=/head/; revision=27753
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/atalk.c4
-rw-r--r--usr.bin/netstat/ipx.c3
-rw-r--r--usr.bin/netstat/main.c28
-rw-r--r--usr.bin/netstat/mbuf.c5
-rw-r--r--usr.bin/netstat/netstat.h3
-rw-r--r--usr.bin/netstat/route.c6
-rw-r--r--usr.bin/netstat/unix.c4
7 files changed, 23 insertions, 30 deletions
diff --git a/usr.bin/netstat/atalk.c b/usr.bin/netstat/atalk.c
index e1fe34daad43..6308e733d495 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 <sys/param.h>
@@ -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 0e8d34ff8d17..d68eae98ba34 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 <sys/param.h>
@@ -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 08e15ee10f26..c9e7c429341c 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 <sys/param.h>
@@ -49,6 +53,7 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94";
#include <netinet/in.h>
#include <ctype.h>
+#include <err.h>
#include <errno.h>
#include <kvm.h>
#include <limits.h>
@@ -59,7 +64,6 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94";
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <err.h>
#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 cfefa5e4e98c..b80b5f542175 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 <sys/param.h>
@@ -41,6 +45,7 @@ static char sccsid[] = "@(#)mbuf.c 8.1 (Berkeley) 6/6/93";
#include <sys/socket.h>
#include <sys/sysctl.h>
+#include <err.h>
#include <stdio.h>
#include "netstat.h"
diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h
index 708094f1bdac..30e049c21d4b 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 e920aaaf9457..6eb7b212a0b3 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 <sys/param.h>
@@ -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 0309d1c30a47..a37da93002fc 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 */
/*