summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authorassar <assar@FreeBSD.org>2001-06-15 23:35:13 +0000
committerassar <assar@FreeBSD.org>2001-06-15 23:35:13 +0000
commitee746c97f9f42b279e24583560b4f0eaef1e081b (patch)
treebe8dfc77df9326b0c2d3ba9f0c53529e94f411ce /usr.bin/netstat/main.c
parent16333bcfca3555bf1ca7a34e59b4cf193053a97a (diff)
downloadFreeBSD-src-ee746c97f9f42b279e24583560b4f0eaef1e081b.zip
FreeBSD-src-ee746c97f9f42b279e24583560b4f0eaef1e081b.tar.gz
remove K&R support
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r--usr.bin/netstat/main.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index 7317f7d..51e5da4 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -160,9 +160,11 @@ struct protox {
u_char pr_index; /* index into nlist of cb head */
u_char pr_sindex; /* index into nlist of stat block */
u_char pr_wanted; /* 1 if wanted, 0 otherwise */
- void (*pr_cblocks)(); /* control blocks printing routine */
- void (*pr_stats)(); /* statistics printing routine */
- void (*pr_istats)(); /* per/if statistics printing routine */
+ void (*pr_cblocks)(u_long, char *, int);
+ /* control blocks printing routine */
+ void (*pr_stats)(u_long, char *, int);
+ /* statistics printing routine */
+ void (*pr_istats)(char *); /* per/if statistics printing routine */
char *pr_name; /* well-known name */
int pr_usesysctl; /* true if we use sysctl, not kvm */
} protox[] = {
@@ -294,10 +296,10 @@ struct protox *protoprotox[] = {
#endif
NULL };
-static void printproto __P((struct protox *, char *));
-static void usage __P((void));
-static struct protox *name2protox __P((char *));
-static struct protox *knownname __P((char *));
+static void printproto (struct protox *, char *);
+static void usage (void);
+static struct protox *name2protox (char *);
+static struct protox *knownname (char *);
static kvm_t *kvmd;
static char *nlistf = NULL, *memf = NULL;
@@ -653,10 +655,7 @@ printproto(tp, name)
* Read kernel memory, return 0 on success.
*/
int
-kread(addr, buf, size)
- u_long addr;
- char *buf;
- int size;
+kread(u_long addr, char *buf, int size)
{
if (kvmd == 0) {
/*
@@ -693,15 +692,13 @@ kread(addr, buf, size)
}
char *
-plural(n)
- int n;
+plural(int n)
{
return (n != 1 ? "s" : "");
}
char *
-plurales(n)
- int n;
+plurales(int n)
{
return (n != 1 ? "es" : "");
}
@@ -710,8 +707,7 @@ plurales(n)
* Find the protox for the given "well-known" name.
*/
static struct protox *
-knownname(name)
- char *name;
+knownname(char *name)
{
struct protox **tpp, *tp;
@@ -726,8 +722,7 @@ knownname(name)
* Find the protox corresponding to name.
*/
static struct protox *
-name2protox(name)
- char *name;
+name2protox(char *name)
{
struct protox *tp;
char **alias; /* alias from p->aliases */
@@ -754,7 +749,7 @@ name2protox(name)
}
static void
-usage()
+usage(void)
{
(void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
"usage: netstat [-AaLlnW] [-f address_family] [-M core] [-N system]",
OpenPOWER on IntegriCloud