From ee746c97f9f42b279e24583560b4f0eaef1e081b Mon Sep 17 00:00:00 2001 From: assar Date: Fri, 15 Jun 2001 23:35:13 +0000 Subject: remove K&R support --- usr.bin/netstat/main.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'usr.bin/netstat/main.c') 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]", -- cgit v1.1