diff --git a/usr.sbin/faithd/prefix.c b/usr.sbin/faithd/prefix.c index 2265bf83e5a7..2b38ffbd1f3a 100644 --- a/usr.sbin/faithd/prefix.c +++ b/usr.sbin/faithd/prefix.c @@ -1,4 +1,4 @@ -/* $NetBSD: prefix.c,v 1.8 2010/11/26 18:58:43 christos Exp $ */ +/* $NetBSD: prefix.c,v 1.9 2018/01/23 21:06:24 sevan Exp $ */ /* $KAME: prefix.c,v 1.13 2003/09/02 22:50:17 itojun Exp $ */ /* @@ -47,11 +47,11 @@ #include "faithd.h" #include "prefix.h" -static int prefix_set __P((const char *, struct prefix *, int)); -static struct config *config_load1 __P((const char *)); +static int prefix_set(const char *, struct prefix *, int); +static struct config *config_load1(const char *); #if 0 -static void config_show1 __P((const struct config *)); -static void config_show __P((void)); +static void config_show1(const struct config *); +static void config_show(void); #endif struct config *config_list = NULL; diff --git a/usr.sbin/inetd/ipsec.h b/usr.sbin/inetd/ipsec.h index 36e9c4b68e37..9b2fbea17b42 100644 --- a/usr.sbin/inetd/ipsec.h +++ b/usr.sbin/inetd/ipsec.h @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.h,v 1.1 2000/01/31 14:28:20 itojun Exp $ */ +/* $NetBSD: ipsec.h,v 1.2 2018/01/23 21:06:24 sevan Exp $ */ /* * Copyright (C) 1999 WIDE Project. @@ -29,6 +29,6 @@ * SUCH DAMAGE. */ -extern int ipsecsetup __P((int, int, const char *)); -extern int ipsecsetup_test __P((const char *)); -extern int ipsecsetup0 __P((int, int, const char *, int)); +extern int ipsecsetup(int, int, const char *); +extern int ipsecsetup_test(const char *); +extern int ipsecsetup0(int, int, const char *, int); diff --git a/usr.sbin/isdn/daicctl/daicctl.h b/usr.sbin/isdn/daicctl/daicctl.h index a93c70a5d0f4..563698d1ac6d 100644 --- a/usr.sbin/isdn/daicctl/daicctl.h +++ b/usr.sbin/isdn/daicctl/daicctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: daicctl.h,v 1.7 2008/04/28 20:24:16 martin Exp $ */ +/* $NetBSD: daicctl.h,v 1.8 2018/01/23 21:06:24 sevan Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -31,10 +31,10 @@ #define PATH_ISDN_DEV "/dev/isdn" -extern void download __P((int fd, int controller, char *filename)); -extern void simpccard __P((char *controller, int insert)); -extern void xlog __P((int fd, int controller)); -extern void xversion __P((int fd, int controller)); -extern void istat __P((int fd, int controller)); -extern void passthrough __P((int fd, int controller)); +extern void download(int fd, int controller, char *filename); +extern void simpccard(char *controller, int insert); +extern void xlog(int fd, int controller); +extern void xversion(int fd, int controller); +extern void istat(int fd, int controller); +extern void passthrough(int fd, int controller); diff --git a/usr.sbin/isdn/daicctl/dnload.c b/usr.sbin/isdn/daicctl/dnload.c index ea56af2f423f..d9b8efaa3094 100644 --- a/usr.sbin/isdn/daicctl/dnload.c +++ b/usr.sbin/isdn/daicctl/dnload.c @@ -1,4 +1,4 @@ -/* $NetBSD: dnload.c,v 1.7 2009/04/16 05:56:32 lukem Exp $ */ +/* $NetBSD: dnload.c,v 1.8 2018/01/23 21:06:24 sevan Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -40,9 +40,7 @@ #include "daicctl.h" void -download(fd, controller, filename) - int fd, controller; - char *filename; +download(int fd, int controller, char *filename) { int i, num_ports = 1; struct isdn_download_request dr; diff --git a/usr.sbin/iteconfig/iteconfig.c b/usr.sbin/iteconfig/iteconfig.c index b82467620f7f..b7e3f2c31fd5 100644 --- a/usr.sbin/iteconfig/iteconfig.c +++ b/usr.sbin/iteconfig/iteconfig.c @@ -1,4 +1,4 @@ -/* $NetBSD: iteconfig.c,v 1.9 2009/04/26 19:56:20 mlelstv Exp $ */ +/* $NetBSD: iteconfig.c,v 1.10 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps * All rights reserved. @@ -31,7 +31,7 @@ */ #include #ifndef lint -__RCSID("$NetBSD: iteconfig.c,v 1.9 2009/04/26 19:56:20 mlelstv Exp $"); +__RCSID("$NetBSD: iteconfig.c,v 1.10 2018/01/23 21:06:25 sevan Exp $"); #endif #include @@ -67,19 +67,16 @@ __RCSID("$NetBSD: iteconfig.c,v 1.9 2009/04/26 19:56:20 mlelstv Exp $"); #include "pathnames.h" -int initialize __P((const char *, struct itewinsize *, struct itebell *, - struct itewinsize *, struct itebell *)); -int main __P((int, char **)); -void printcmap __P((colormap_t *, int)); -void xioctl __P((int, int, void *)); -colormap_t *xgetcmap __P((int, int)); -long xstrtol __P((char *)); -void usage __P((void)); +int initialize(const char *, struct itewinsize *, struct itebell *, + struct itewinsize *, struct itebell *); +void printcmap(colormap_t *, int); +void xioctl(int, int, void *); +colormap_t *xgetcmap(int, int); +long xstrtol(char *); +static void usage(void) __dead; int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { struct itewinsize is, newis; struct itebell ib, newib; @@ -194,17 +191,14 @@ main(argc, argv) } void -xioctl(fd, cmd, addr) - int fd, cmd; - void *addr; +xioctl(int fd, int cmd, void *addr) { if (ioctl(fd, cmd, addr) == -1) err(1, "ioctl"); } long -xstrtol(s) - char *s; +xstrtol(char *s) { long rv; @@ -216,9 +210,7 @@ xstrtol(s) } colormap_t * -xgetcmap(fd, ncolors) - int fd; - int ncolors; +xgetcmap(int fd, int ncolors) { colormap_t *cm; @@ -233,9 +225,7 @@ xgetcmap(fd, ncolors) } void -printcmap(cm, ncols) - colormap_t *cm; - int ncols; +printcmap(colormap_t *cm, int ncols) { int i, nel; @@ -283,8 +273,8 @@ initialize(file, is, ib, newis, newib) return(fd); } -void -usage() +static void +usage(void) { fprintf(stderr, "%s\n\t\t%s\n\t\t%s\n", "usage: iteconfig [-i] [-f file] [-v volume] [-p pitch] [-t msec]", diff --git a/usr.sbin/kvm_mkdb/extern.h b/usr.sbin/kvm_mkdb/extern.h index 00c0bbc1b7cd..4e798010f417 100644 --- a/usr.sbin/kvm_mkdb/extern.h +++ b/usr.sbin/kvm_mkdb/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.19 2003/08/07 11:25:23 agc Exp $ */ +/* $NetBSD: extern.h,v 1.20 2018/01/23 21:06:25 sevan Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -97,22 +97,22 @@ /* #define NLIST_ELF64 */ #endif -void create_knlist __P((const char *, DB *)); -void punt __P((void)); -int testdb __P((void)); +void create_knlist(const char *, DB *); +void punt(void); +int testdb(void); #ifdef NLIST_AOUT -int create_knlist_aout __P((const char *, DB *)); +int create_knlist_aout(const char *, DB *); #endif #ifdef NLIST_COFF -int create_knlist_coff __P((const char *, DB *)); +int create_knlist_coff(const char *, DB *); #endif #ifdef NLIST_ECOFF -int create_knlist_ecoff __P((const char *, DB *)); +int create_knlist_ecoff(const char *, DB *); #endif #ifdef NLIST_ELF32 -int create_knlist_elf32 __P((const char *, DB *)); +int create_knlist_elf32(const char *, DB *); #endif #ifdef NLIST_ELF64 -int create_knlist_elf64 __P((const char *, DB *)); +int create_knlist_elf64(const char *, DB *); #endif diff --git a/usr.sbin/kvm_mkdb/kvm_mkdb.c b/usr.sbin/kvm_mkdb/kvm_mkdb.c index 17a111dc08ab..d0f3e10cb085 100644 --- a/usr.sbin/kvm_mkdb/kvm_mkdb.c +++ b/usr.sbin/kvm_mkdb/kvm_mkdb.c @@ -1,4 +1,4 @@ -/* $NetBSD: kvm_mkdb.c,v 1.20 2008/07/21 13:36:58 lukem Exp $ */ +/* $NetBSD: kvm_mkdb.c,v 1.21 2018/01/23 21:06:25 sevan Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -71,7 +71,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\ #if 0 static char sccsid[] = "from: @(#)kvm_mkdb.c 8.3 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: kvm_mkdb.c,v 1.20 2008/07/21 13:36:58 lukem Exp $"); +__RCSID("$NetBSD: kvm_mkdb.c,v 1.21 2018/01/23 21:06:25 sevan Exp $"); #endif #endif /* not lint */ @@ -90,8 +90,7 @@ __RCSID("$NetBSD: kvm_mkdb.c,v 1.20 2008/07/21 13:36:58 lukem Exp $"); #include "extern.h" - int main __P((int, char **)); -static void usage __P((void)); +static void usage(void) __dead; HASHINFO openinfo = { 4096, /* bsize */ @@ -107,9 +106,7 @@ static char *dbname = NULL; static char dbtemp[MAXPATHLEN]; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch; char *nlistpath; @@ -181,8 +178,8 @@ main(argc, argv) exit(0); } -void -usage() +static void +usage(void) { (void)fprintf(stderr, "usage: kvm_mkdb [-o database] [file]\n"); exit(1); diff --git a/usr.sbin/kvm_mkdb/nlist.c b/usr.sbin/kvm_mkdb/nlist.c index c7bc2f1adac9..b8d6c2051cc1 100644 --- a/usr.sbin/kvm_mkdb/nlist.c +++ b/usr.sbin/kvm_mkdb/nlist.c @@ -1,4 +1,4 @@ -/* $NetBSD: nlist.c,v 1.19 2003/08/07 11:25:23 agc Exp $ */ +/* $NetBSD: nlist.c,v 1.20 2018/01/23 21:06:25 sevan Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -66,7 +66,7 @@ #if 0 static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: nlist.c,v 1.19 2003/08/07 11:25:23 agc Exp $"); +__RCSID("$NetBSD: nlist.c,v 1.20 2018/01/23 21:06:25 sevan Exp $"); #endif #endif /* not lint */ @@ -87,7 +87,7 @@ __RCSID("$NetBSD: nlist.c,v 1.19 2003/08/07 11:25:23 agc Exp $"); #include "extern.h" static struct { - int (*knlist) __P((const char *, DB *)); + int (*knlist)(const char *, DB *); } knlist_fmts[] = { #ifdef NLIST_AOUT { create_knlist_aout }, @@ -107,9 +107,7 @@ static struct { }; void -create_knlist(name, db) - const char *name; - DB *db; +create_knlist(const char *name, DB *db) { int i; diff --git a/usr.sbin/kvm_mkdb/nlist_aout.c b/usr.sbin/kvm_mkdb/nlist_aout.c index 58116ddef1e1..33fb2f73f777 100644 --- a/usr.sbin/kvm_mkdb/nlist_aout.c +++ b/usr.sbin/kvm_mkdb/nlist_aout.c @@ -1,4 +1,4 @@ -/* $NetBSD: nlist_aout.c,v 1.9 2011/01/04 09:36:13 wiz Exp $ */ +/* $NetBSD: nlist_aout.c,v 1.10 2018/01/23 21:06:25 sevan Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -66,7 +66,7 @@ #if 0 static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: nlist_aout.c,v 1.9 2011/01/04 09:36:13 wiz Exp $"); +__RCSID("$NetBSD: nlist_aout.c,v 1.10 2018/01/23 21:06:25 sevan Exp $"); #endif #endif /* not lint */ @@ -98,15 +98,13 @@ typedef struct nlist NLIST; punt(); \ } while (0) -static void badread __P((int, char *)); -static u_long get_kerntext __P((const char *kfn)); +static void badread(int, char *); +static u_long get_kerntext(const char *kfn); static const char *kfile; int -create_knlist_aout(name, db) - const char *name; - DB *db; +create_knlist_aout(const char *name, DB *db) { int nsyms; struct exec ebuf; @@ -244,9 +242,7 @@ create_knlist_aout(name, db) } static void -badread(nr, p) - int nr; - char *p; +badread(int nr, char *p) { if (nr < 0) { warn("%s", kfile); @@ -262,8 +258,7 @@ badread(nr, p) * when the standard symbol name is not found. */ static u_long -get_kerntext(name) - const char *name; +get_kerntext(const char *name) { struct nlist nl[2]; diff --git a/usr.sbin/mailwrapper/mailwrapper.c b/usr.sbin/mailwrapper/mailwrapper.c index 516cc9b2428c..8ce5697f6681 100644 --- a/usr.sbin/mailwrapper/mailwrapper.c +++ b/usr.sbin/mailwrapper/mailwrapper.c @@ -1,4 +1,4 @@ -/* $NetBSD: mailwrapper.c,v 1.10 2009/04/16 07:13:16 lukem Exp $ */ +/* $NetBSD: mailwrapper.c,v 1.11 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 1998 @@ -44,14 +44,11 @@ struct arglist { const char **argv; }; -int main __P((int, char *[], char *[])); - -static void initarg __P((struct arglist *)); -static void addarg __P((struct arglist *, const char *, int)); +static void initarg(struct arglist *); +static void addarg(struct arglist *, const char *, int); static void -initarg(al) - struct arglist *al; +initarg(struct arglist *al) { al->argc = 0; al->maxc = 10; @@ -68,10 +65,7 @@ initarg(al) } static void -addarg(al, arg, copy) - struct arglist *al; - const char *arg; - int copy; +addarg(struct arglist *al, const char *arg, int copy) { if (al->argc == al->maxc) { al->maxc <<= 1; @@ -87,10 +81,7 @@ addarg(al, arg, copy) } int -main(argc, argv, envp) - int argc; - char *argv[]; - char *envp[]; +main(int argc, char *argv[], char *envp[]) { FILE *config; char *line, *cp, *from, *to, *ap; diff --git a/usr.sbin/mdconfig/mdconfig.c b/usr.sbin/mdconfig/mdconfig.c index 9ebfdaa9df46..3434ee65a9cf 100644 --- a/usr.sbin/mdconfig/mdconfig.c +++ b/usr.sbin/mdconfig/mdconfig.c @@ -1,4 +1,4 @@ -/* $NetBSD: mdconfig.c,v 1.5 2009/10/21 23:12:10 snj Exp $ */ +/* $NetBSD: mdconfig.c,v 1.6 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -27,7 +27,7 @@ #include #ifndef lint -__RCSID("$NetBSD: mdconfig.c,v 1.5 2009/10/21 23:12:10 snj Exp $"); +__RCSID("$NetBSD: mdconfig.c,v 1.6 2018/01/23 21:06:25 sevan Exp $"); #endif /* @@ -48,12 +48,8 @@ __RCSID("$NetBSD: mdconfig.c,v 1.5 2009/10/21 23:12:10 snj Exp $"); #include #include -int main __P((int, char **)); - int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { struct md_conf md; size_t nblks; diff --git a/usr.sbin/memswitch/memswitch.c b/usr.sbin/memswitch/memswitch.c index da9334c788ed..d219350bbe77 100644 --- a/usr.sbin/memswitch/memswitch.c +++ b/usr.sbin/memswitch/memswitch.c @@ -1,4 +1,4 @@ -/* $NetBSD: memswitch.c,v 1.12 2011/01/14 13:31:47 minoura Exp $ */ + /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -58,9 +58,7 @@ int nflag = 0; u_int8_t *current_values = 0; u_int8_t *modified_values = 0; -int main __P((int, char*[])); - -void +static void usage(void) { fprintf(stderr, "usage: %s -a\n", progname); @@ -71,9 +69,7 @@ usage(void) } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch; enum md { @@ -155,8 +151,7 @@ main(argc, argv) } void -show_single(name) - const char *name; +show_single(const char *name) { int i; int n = 0; @@ -198,8 +193,7 @@ show_all(void) } void -modify_single(expr) - const char *expr; +modify_single(const char *expr) { int i, l, n; char *class = NULL, *node = NULL; @@ -257,8 +251,7 @@ modify_single(expr) } void -help_single(name) - const char *name; +help_single(const char *name) { int i; char fullname[50]; @@ -419,8 +412,7 @@ flush(void) } int -save(name) - const char *name; +save(const char *name) { #ifndef DEBUG int fd; @@ -448,8 +440,7 @@ save(name) } int -restore(name) - const char *name; +restore(const char *name) { #ifndef DEBUG int sramfd, fd, i; diff --git a/usr.sbin/memswitch/memswitch.h b/usr.sbin/memswitch/memswitch.h index 85ed4cb99e6f..5340feb5b666 100644 --- a/usr.sbin/memswitch/memswitch.h +++ b/usr.sbin/memswitch/memswitch.h @@ -1,4 +1,4 @@ -/* $NetBSD: memswitch.h,v 1.2 2008/04/28 20:24:17 martin Exp $ */ +/* $NetBSD: memswitch.h,v 1.3 2018/01/23 21:06:25 sevan Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -45,10 +45,10 @@ struct property; -typedef int (*parse_t) __P((struct property*, const char*)); -typedef int (*print_t) __P((struct property*, char*)); -typedef int (*fill_t) __P((struct property*)); -typedef int (*flush_t) __P((struct property*)); +typedef int (*parse_t)(struct property*, const char*); +typedef int (*print_t)(struct property*, char*); +typedef int (*fill_t)(struct property*); +typedef int (*flush_t)(struct property*); struct property { const char *class; @@ -79,13 +79,13 @@ extern char *progname; extern u_int8_t *current_values; extern u_int8_t *modified_values; -void usage __P((void)) __attribute__((noreturn)); -void show_single __P((const char*)); -void show_all __P((void)); -void modify_single __P((const char*)); -void help_single __P((const char*)); -void alloc_current_values __P((void)); -void alloc_modified_values __P((void)); -void flush __P((void)); -int save __P((const char*)); -int restore __P((const char*)); +static void usage(void)) __dead; +void show_single(const char*)); +void show_all(void)); +void modify_single(const char*)); +void help_single(const char*)); +void alloc_current_values(void)); +void alloc_modified_values(void)); +void flush(void)); +int save(const char*)); +int restore(const char*)); diff --git a/usr.sbin/memswitch/methods.c b/usr.sbin/memswitch/methods.c index 5870f828fd5c..d0660ec97b22 100644 --- a/usr.sbin/memswitch/methods.c +++ b/usr.sbin/memswitch/methods.c @@ -1,4 +1,4 @@ -/* $NetBSD: methods.c,v 1.7 2011/01/14 13:31:47 minoura Exp $ */ +/* $NetBSD: methods.c,v 1.8 2018/01/23 21:06:25 sevan Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -38,8 +38,7 @@ #include "methods.h" int -atoi_(p) - const char **p; +atoi_(const char **p) { const char *p1 = *p; int v = 0; @@ -96,8 +95,7 @@ atoi_(p) } int -fill_uchar(prop) - struct property *prop; +fill_uchar(struct property *prop) { if (current_values == 0) alloc_current_values(); @@ -112,8 +110,7 @@ fill_uchar(prop) } int -fill_ushort(prop) - struct property *prop; +fill_ushort(struct property *prop) { if (current_values == 0) alloc_current_values(); @@ -128,8 +125,7 @@ fill_ushort(prop) } int -fill_ulong(prop) - struct property *prop; +fill_ulong(struct property *prop) { if (current_values == 0) alloc_current_values(); @@ -144,8 +140,7 @@ fill_ulong(prop) } int -flush_uchar(prop) - struct property *prop; +flush_uchar(struct property *prop) { if (!prop->modified) return 0; @@ -159,8 +154,7 @@ flush_uchar(prop) } int -flush_ushort(prop) - struct property *prop; +flush_ushort(struct property *prop) { if (!prop->modified) return 0; @@ -175,8 +169,7 @@ flush_ushort(prop) } int -flush_ulong(prop) - struct property *prop; +flush_ulong(struct property *prop) { if (!prop->modified) return 0; @@ -193,16 +186,13 @@ flush_ulong(prop) } int -flush_dummy(prop) - struct property *prop; +flush_dummy(struct property *prop) { return 0; } int -parse_dummy(prop, value) - struct property *prop; - const char *value; +parse_dummy(struct property *prop, const char *value) { warnx("Cannot modify %s.%s", prop->class, prop->node); @@ -210,9 +200,7 @@ parse_dummy(prop, value) } int -parse_byte(prop, value) - struct property *prop; - const char *value; +parse_byte(struct property *prop, const char *value) { const char *p = value; int v; @@ -248,9 +236,7 @@ parse_byte(prop, value) } int -parse_uchar(prop, value) - struct property *prop; - const char *value; +parse_uchar(struct property *prop, const char *value) { const char *p = value; int v; @@ -276,9 +262,7 @@ parse_uchar(prop, value) } int -parse_ulong(prop, value) - struct property *prop; - const char *value; +parse_ulong(struct property *prop, const char *value) { const char *p = value; int v; @@ -304,9 +288,7 @@ parse_ulong(prop, value) } int -parse_ushort(prop, value) - struct property *prop; - const char *value; +parse_ushort(struct property *prop, const char *value) { const char *p = value; int v; @@ -332,9 +314,7 @@ parse_ushort(prop, value) } int -parse_time(prop, value) - struct property *prop; - const char *value; +parse_time(struct property *prop, const char *value) { const char *p = value; int v; @@ -377,9 +357,7 @@ parse_time(prop, value) } int -parse_bootdev(prop, value) - struct property *prop; - const char *value; +parse_bootdev(struct property *prop, const char *value) { const char *p = value; int v; @@ -441,9 +419,7 @@ parse_bootdev(prop, value) } int -parse_serial(prop, value) - struct property *prop; - const char *value; +parse_serial(struct property *prop, const char *value) #define NEXTSPEC while (*p == ' ' || *p == '\t') p++; \ if (*p++ != ',') { \ warnx("%s: Invalid value", value); \ @@ -543,9 +519,7 @@ parse_serial(prop, value) #undef NEXTSPEC int -parse_srammode(prop, value) - struct property *prop; - const char *value; +parse_srammode(struct property *prop, const char *value) { static const char *const sramstrs[] = {"unused", "SRAMDISK", "program"}; int i; @@ -566,9 +540,7 @@ parse_srammode(prop, value) } int -print_uchar(prop, str) - struct property *prop; - char *str; +print_uchar(struct property *prop, char *str) { if (prop->modified) snprintf(str, MAXVALUELEN, @@ -584,9 +556,7 @@ print_uchar(prop, str) } int -print_ucharh(prop, str) - struct property *prop; - char *str; +print_ucharh(struct property *prop, char *str) { if (prop->modified) snprintf(str, MAXVALUELEN, @@ -602,9 +572,7 @@ print_ucharh(prop, str) } int -print_ushorth(prop, str) - struct property *prop; - char *str; +print_ushorth(struct property *prop, char *str) { if (prop->modified) snprintf(str, MAXVALUELEN, @@ -620,9 +588,7 @@ print_ushorth(prop, str) } int -print_ulong(prop, str) - struct property *prop; - char *str; +print_ulong(struct property *prop, char *str) { if (prop->modified) snprintf(str, MAXVALUELEN, @@ -638,9 +604,7 @@ print_ulong(prop, str) } int -print_ulongh(prop, str) - struct property *prop; - char *str; +print_ulongh(struct property *prop, char *str) { if (prop->modified) snprintf(str, MAXVALUELEN, @@ -656,9 +620,7 @@ print_ulongh(prop, str) } int -print_magic(prop, str) - struct property *prop; - char *str; +print_magic(struct property *prop, char *str) { if (!prop->value_valid) prop->fill(prop); @@ -672,9 +634,7 @@ print_magic(prop, str) } int -print_timesec(prop, str) - struct property *prop; - char *str; +print_timesec(struct property *prop, char *str) { if (prop->modified) snprintf(str, MAXVALUELEN, @@ -690,9 +650,7 @@ print_timesec(prop, str) } int -print_bootdev(prop, str) - struct property *prop; - char *str; +print_bootdev(struct property *prop, char *str) { unsigned int v; @@ -721,9 +679,7 @@ print_bootdev(prop, str) } int -print_serial(prop, str) - struct property *prop; - char *str; +print_serial(struct property *prop, char *str) { unsigned int v; const char *baud, *stop; @@ -754,9 +710,7 @@ print_serial(prop, str) } int -print_srammode(prop, str) - struct property *prop; - char *str; +print_srammode(struct property *prop, char *str) { int v; static const char *const sramstrs[] = {"unused", "SRAMDISK", "program"}; diff --git a/usr.sbin/memswitch/methods.h b/usr.sbin/memswitch/methods.h index 0bdc24cbde4c..1f02898bcfb6 100644 --- a/usr.sbin/memswitch/methods.h +++ b/usr.sbin/memswitch/methods.h @@ -1,4 +1,4 @@ -/* $NetBSD: methods.h,v 1.4 2008/04/28 20:24:17 martin Exp $ */ +/* $NetBSD: methods.h,v 1.5 2018/01/23 21:06:25 sevan Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,34 +30,34 @@ */ -int atoi_ __P((const char**)); +int atoi_(const char**); -int fill_uchar __P((struct property*)); -int fill_ushort __P((struct property*)); -int fill_ulong __P((struct property*)); +int fill_uchar(struct property*); +int fill_ushort(struct property*); +int fill_ulong(struct property*); -int flush_uchar __P((struct property*)); -int flush_ushort __P((struct property*)); -int flush_ulong __P((struct property*)); -int flush_dummy __P((struct property*)); +int flush_uchar(struct property*); +int flush_ushort(struct property*); +int flush_ulong(struct property*); +int flush_dummy(struct property*); -int parse_dummy __P((struct property*, const char*)); -int parse_uchar __P((struct property*, const char*)); -int parse_ushort __P((struct property*, const char*)); -int parse_ulong __P((struct property*, const char*)); -int parse_byte __P((struct property*, const char*)); -int parse_time __P((struct property*, const char*)); -int parse_bootdev __P((struct property*, const char*)); -int parse_serial __P((struct property*, const char*)); -int parse_srammode __P((struct property*, const char*)); +int parse_dummy(struct property*, const char*); +int parse_uchar(struct property*, const char*); +int parse_ushort(struct property*, const char*); +int parse_ulong(struct property*, const char*); +int parse_byte(struct property*, const char*); +int parse_time(struct property*, const char*); +int parse_bootdev(struct property*, const char*); +int parse_serial(struct property*, const char*); +int parse_srammode(struct property*, const char*); -int print_uchar __P((struct property*, char*)); -int print_ucharh __P((struct property*, char*)); -int print_ushorth __P((struct property*, char*)); -int print_ulong __P((struct property*, char*)); -int print_ulongh __P((struct property*, char*)); -int print_magic __P((struct property*, char*)); -int print_timesec __P((struct property*, char*)); -int print_bootdev __P((struct property*, char*)); -int print_serial __P((struct property*, char*)); -int print_srammode __P((struct property*, char*)); +int print_uchar(struct property*, char*); +int print_ucharh(struct property*, char*); +int print_ushorth(struct property*, char*); +int print_ulong(struct property*, char*); +int print_ulongh(struct property*, char*); +int print_magic(struct property*, char*); +int print_timesec(struct property*, char*); +int print_bootdev(struct property*, char*); +int print_serial(struct property*, char*); +int print_srammode(struct property*, char*); diff --git a/usr.sbin/mscdlabel/main.c b/usr.sbin/mscdlabel/main.c index 7164fc7c46c9..feeb7ad83d14 100644 --- a/usr.sbin/mscdlabel/main.c +++ b/usr.sbin/mscdlabel/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.5 2017/01/10 21:03:36 christos Exp $ */ +/* $NetBSD: main.c,v 1.6 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 2002, 2005 @@ -53,7 +53,6 @@ static int getcdtoc(int); static int getfaketoc(int); -int main(int, char **); const char *disk = "cd0"; int ntracks; @@ -123,9 +122,7 @@ getfaketoc(int fd) } int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { int fd, res, i, j, rawpart; char fullname[MAXPATHLEN]; diff --git a/usr.sbin/rbootd/bpf.c b/usr.sbin/rbootd/bpf.c index 48d6039727a0..7d2dc9d68e99 100644 --- a/usr.sbin/rbootd/bpf.c +++ b/usr.sbin/rbootd/bpf.c @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.20 2011/02/08 20:20:28 rmind Exp $ */ +/* $NetBSD: bpf.c,v 1.21 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 1988, 1992 The University of Utah and the Center @@ -47,7 +47,7 @@ #if 0 static char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: bpf.c,v 1.20 2011/02/08 20:20:28 rmind Exp $"); +__RCSID("$NetBSD: bpf.c,v 1.21 2018/01/23 21:06:25 sevan Exp $"); #endif #endif /* not lint */ @@ -215,8 +215,7 @@ BpfOpen() ** None. */ char * -BpfGetIntfName(errmsg) - char **errmsg; +BpfGetIntfName(char **errmsg) { struct ifaddrs *ifap, *ifa, *p; int minunit, n; @@ -281,9 +280,7 @@ BpfGetIntfName(errmsg) ** None. */ int -BpfRead(rconn, doread) - RMPCONN *rconn; - int doread; +BpfRead(RMPCONN *rconn, int doread) { int datlen, caplen, hdrlen; static u_int8_t *bp = NULL, *ep = NULL; @@ -348,8 +345,7 @@ BpfRead(rconn, doread) ** None. */ int -BpfWrite(rconn) - RMPCONN *rconn; +BpfWrite(RMPCONN *rconn) { if (write(BpfFd, (char *)&rconn->rmp, rconn->rmplen) < 0) { syslog(LOG_ERR, "write: %s: %m", EnetStr(rconn)); diff --git a/usr.sbin/rbootd/defs.h b/usr.sbin/rbootd/defs.h index 6b2d9ca5e28a..a46a490c5e15 100644 --- a/usr.sbin/rbootd/defs.h +++ b/usr.sbin/rbootd/defs.h @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.11 2011/08/31 13:32:40 joerg Exp $ */ +/* $NetBSD: defs.h,v 1.12 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 1988, 1992 The University of Utah and the Center @@ -146,36 +146,36 @@ extern RMPCONN *RmpConns; /* list of active connections */ extern u_int8_t RmpMcastAddr[]; /* RMP multicast address */ -void AddConn __P((RMPCONN *)); -int BootDone __P((RMPCONN *)); -void BpfClose __P((void)); -char *BpfGetIntfName __P((char **)); -int BpfOpen __P((void)); -int BpfRead __P((RMPCONN *, int)); -int BpfWrite __P((RMPCONN *)); -void DebugOff __P((int)); -void DebugOn __P((int)); -void DispPkt __P((RMPCONN *, int)); -void DoTimeout __P((void)); -void DspFlnm __P((u_int, char *)); -void Exit __P((int)) __dead; -CLIENT *FindClient __P((RMPCONN *)); -RMPCONN *FindConn __P((RMPCONN *)); -void FreeClients __P((void)); -void FreeConn __P((RMPCONN *)); -void FreeConns __P((void)); -int GetBootFiles __P((void)); -char *GetEtherAddr __P((u_int8_t *)); -CLIENT *NewClient __P((u_int8_t *)); -RMPCONN *NewConn __P((RMPCONN *)); -char *NewStr __P((char *)); -u_int8_t *ParseAddr __P((char *)); -int ParseConfig __P((void)); -void ProcessPacket __P((RMPCONN *, CLIENT *)); -void ReConfig __P((int)); -void RemoveConn __P((RMPCONN *)); -int SendBootRepl __P((struct rmp_packet *, RMPCONN *, char *[])); -int SendFileNo __P((struct rmp_packet *, RMPCONN *, char *[])); -int SendPacket __P((RMPCONN *)); -int SendReadRepl __P((RMPCONN *)); -int SendServerID __P((RMPCONN *)); +void AddConn(RMPCONN *); +int BootDone(RMPCONN *); +void BpfClose(void); +char *BpfGetIntfName(char **); +int BpfOpen(void); +int BpfRead(RMPCONN *, int); +int BpfWrite(RMPCONN *); +void DebugOff(int); +void DebugOn(int); +void DispPkt(RMPCONN *, int); +void DoTimeout(void); +void DspFlnm(u_int, char *); +void Exit(int) __dead; +CLIENT *FindClient(RMPCONN *); +RMPCONN *FindConn(RMPCONN *); +void FreeClients(void); +void FreeConn(RMPCONN *); +void FreeConns(void); +int GetBootFiles(void); +char *GetEtherAddr(u_int8_t *); +CLIENT *NewClient(u_int8_t *); +RMPCONN *NewConn(RMPCONN *); +char *NewStr(char *); +u_int8_t *ParseAddr(char *); +int ParseConfig(void); +void ProcessPacket(RMPCONN *, CLIENT *); +void ReConfig(int); +void RemoveConn(RMPCONN *); +int SendBootRepl(struct rmp_packet *, RMPCONN *, char *[]); +int SendFileNo(struct rmp_packet *, RMPCONN *, char *[]); +int SendPacket(RMPCONN *); +int SendReadRepl(RMPCONN *); +int SendServerID(RMPCONN *); diff --git a/usr.sbin/rbootd/parseconf.c b/usr.sbin/rbootd/parseconf.c index e26880ad8895..739edf8c1a95 100644 --- a/usr.sbin/rbootd/parseconf.c +++ b/usr.sbin/rbootd/parseconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: parseconf.c,v 1.11 2011/02/08 20:20:28 rmind Exp $ */ +/* $NetBSD: parseconf.c,v 1.12 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 1988, 1992 The University of Utah and the Center @@ -47,7 +47,7 @@ #if 0 static char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: parseconf.c,v 1.11 2011/02/08 20:20:28 rmind Exp $"); +__RCSID("$NetBSD: parseconf.c,v 1.12 2018/01/23 21:06:25 sevan Exp $"); #endif #endif /* not lint */ @@ -246,8 +246,7 @@ ParseConfig() ** be copied if it's to be saved. */ u_int8_t * -ParseAddr(str) - char *str; +ParseAddr(char *str) { static u_int8_t addr[RMP_ADDRLEN]; char *cp; diff --git a/usr.sbin/rbootd/rmpproto.c b/usr.sbin/rbootd/rmpproto.c index 49832a7f61e8..abf31be50dbf 100644 --- a/usr.sbin/rbootd/rmpproto.c +++ b/usr.sbin/rbootd/rmpproto.c @@ -1,4 +1,4 @@ -/* $NetBSD: rmpproto.c,v 1.15 2011/02/08 20:20:28 rmind Exp $ */ +/* $NetBSD: rmpproto.c,v 1.16 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 1988, 1992 The University of Utah and the Center @@ -47,7 +47,7 @@ #if 0 static char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: rmpproto.c,v 1.15 2011/02/08 20:20:28 rmind Exp $"); +__RCSID("$NetBSD: rmpproto.c,v 1.16 2018/01/23 21:06:25 sevan Exp $"); #endif #endif /* not lint */ @@ -85,9 +85,7 @@ __RCSID("$NetBSD: rmpproto.c,v 1.15 2011/02/08 20:20:28 rmind Exp $"); ** sent to the host that sent the packet. */ void -ProcessPacket(rconn, client) - RMPCONN *rconn; - CLIENT *client; +ProcessPacket(RMPCONN *rconn, CLIENT *client) { struct rmp_packet *rmp; RMPCONN *rconnout; @@ -175,8 +173,7 @@ ProcessPacket(rconn, client) ** none. */ int -SendServerID(rconn) - RMPCONN *rconn; +SendServerID(RMPCONN *rconn) { struct rmp_packet *rpl; char *src, *dst; @@ -227,10 +224,7 @@ SendServerID(rconn) ** none. */ int -SendFileNo(req, rconn, filelist) - struct rmp_packet *req; - RMPCONN *rconn; - char *filelist[]; +SendFileNo(struct rmp_packet *req, RMPCONN *rconn, char *filelist[]) { struct rmp_packet *rpl; char *src, *dst; @@ -290,10 +284,7 @@ SendFileNo(req, rconn, filelist) ** none. */ int -SendBootRepl(req, rconn, filelist) - struct rmp_packet *req; - RMPCONN *rconn; - char *filelist[]; +SendBootRepl(struct rmp_packet *req, RMPCONN *rconn, char *filelist[]) { int retval; char *filename, filepath[RMPBOOTDATA+1]; @@ -408,8 +399,7 @@ sendpkt: ** none. */ int -SendReadRepl(rconn) - RMPCONN *rconn; +SendReadRepl(RMPCONN *rconn) { int retval = 0; RMPCONN *oldconn; @@ -526,8 +516,7 @@ sendpkt: ** none. */ int -BootDone(rconn) - RMPCONN *rconn; +BootDone(RMPCONN *rconn) { RMPCONN *oldconn; struct rmp_packet *rpl; @@ -574,8 +563,7 @@ BootDone(rconn) ** none. */ int -SendPacket(rconn) - RMPCONN *rconn; +SendPacket(RMPCONN *rconn) { /* * Set Ethernet Destination address to Source (BPF and the enet diff --git a/usr.sbin/rbootd/utils.c b/usr.sbin/rbootd/utils.c index 57f0de42419f..764043852fb2 100644 --- a/usr.sbin/rbootd/utils.c +++ b/usr.sbin/rbootd/utils.c @@ -1,4 +1,4 @@ -/* $NetBSD: utils.c,v 1.17 2011/02/08 20:20:28 rmind Exp $ */ +/* $NetBSD: utils.c,v 1.18 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 1988, 1992 The University of Utah and the Center @@ -47,7 +47,7 @@ #if 0 static char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: utils.c,v 1.17 2011/02/08 20:20:28 rmind Exp $"); +__RCSID("$NetBSD: utils.c,v 1.18 2018/01/23 21:06:25 sevan Exp $"); #endif #endif /* not lint */ @@ -78,9 +78,7 @@ __RCSID("$NetBSD: utils.c,v 1.17 2011/02/08 20:20:28 rmind Exp $"); ** None. */ void -DispPkt(rconn, direct) - RMPCONN *rconn; - int direct; +DispPkt(RMPCONN *rconn, int direct) { static const char BootFmt[] = "\t\tRetCode:%u SeqNo:%lx SessID:%x Vers:%u"; static const char ReadFmt[] = "\t\tRetCode:%u Offset:%lx SessID:%x\n"; @@ -207,8 +205,7 @@ DispPkt(rconn, direct) ** be copied if it's to be saved. */ char * -GetEtherAddr(addr) - u_int8_t *addr; +GetEtherAddr(u_int8_t *addr) { static char Hex[] = "0123456789abcdef"; static char etherstr[RMP_ADDRLEN*3]; @@ -248,9 +245,7 @@ GetEtherAddr(addr) ** - Characters are sent to `DbgFp'. */ void -DspFlnm(size, flnm) - u_int size; - char *flnm; +DspFlnm(u_int size, char *flnm) { size_t i; @@ -275,8 +270,7 @@ DspFlnm(size, flnm) ** - If malloc() fails, a log message will be generated. */ CLIENT * -NewClient(addr) - u_int8_t *addr; +NewClient(u_int8_t *addr) { CLIENT *ctmp; @@ -333,8 +327,7 @@ FreeClients() ** - If malloc() fails, a log message will be generated. */ char * -NewStr(str) - char *str; +NewStr(char *str) { char *stmp; @@ -367,8 +360,7 @@ static RMPCONN *LastFree = NULL; ** - If malloc() fails, a log message will be generated. */ RMPCONN * -NewConn(rconn) - RMPCONN *rconn; +NewConn(RMPCONN *rconn) { RMPCONN *rtmp; @@ -408,8 +400,7 @@ NewConn(rconn) ** - File desc associated with `rtmp->bootfd' will be closed. */ void -FreeConn(rtmp) - RMPCONN *rtmp; +FreeConn(RMPCONN *rtmp) { /* * If the file descriptor is in use, close the file. @@ -475,8 +466,7 @@ FreeConns() ** - This routine must be called with SIGHUP blocked. */ void -AddConn(rconn) - RMPCONN *rconn; +AddConn(RMPCONN *rconn) { if (RmpConns != NULL) rconn->next = RmpConns; @@ -503,8 +493,7 @@ AddConn(rconn) ** - This routine must be called with SIGHUP blocked. */ RMPCONN * -FindConn(rconn) - RMPCONN *rconn; +FindConn(RMPCONN *rconn) { RMPCONN *rtmp; @@ -533,8 +522,7 @@ FindConn(rconn) ** - This routine must be called with SIGHUP blocked. */ void -RemoveConn(rconn) - RMPCONN *rconn; +RemoveConn(RMPCONN *rconn) { RMPCONN *thisrconn, *lastrconn; diff --git a/usr.sbin/rmt/rmt.c b/usr.sbin/rmt/rmt.c index 1888645c1b1a..d247aa24ff96 100644 --- a/usr.sbin/rmt/rmt.c +++ b/usr.sbin/rmt/rmt.c @@ -1,4 +1,4 @@ -/* $NetBSD: rmt.c,v 1.16 2009/04/18 09:25:50 lukem Exp $ */ +/* $NetBSD: rmt.c,v 1.17 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 1983, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\ #if 0 static char sccsid[] = "@(#)rmt.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: rmt.c,v 1.16 2009/04/18 09:25:50 lukem Exp $"); +__RCSID("$NetBSD: rmt.c,v 1.17 2018/01/23 21:06:25 sevan Exp $"); #endif #endif /* not lint */ @@ -74,15 +74,12 @@ FILE *debug; #define DEBUG1(f,a) if (debug) fprintf(debug, f, a) #define DEBUG2(f,a1,a2) if (debug) fprintf(debug, f, a1, a2) -char *checkbuf __P((char *, int)); -void error __P((int)); -int main __P((int, char **)); -void getstring __P((char *, size_t)); +char *checkbuf(char *, int); +void error(int); +void getstring(char *, size_t); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { char *record = NULL; int rval; @@ -209,9 +206,7 @@ ioerror: } void -getstring(bp, size) - char *bp; - size_t size; +getstring(char *bp, size_t size) { char *cp = bp; char *ep = bp + size - 1; @@ -224,9 +219,7 @@ getstring(bp, size) } char * -checkbuf(record, size) - char *record; - int size; +checkbuf(char *record, int size) { if (size <= maxrecsize) @@ -246,8 +239,7 @@ checkbuf(record, size) } void -error(num) - int num; +error(int num) { DEBUG2("rmtd: E %d (%s)\n", num, strerror(num)); diff --git a/usr.sbin/rpc.lockd/lockd.h b/usr.sbin/rpc.lockd/lockd.h index 39080aa25a9d..ac3c50d2f29f 100644 --- a/usr.sbin/rpc.lockd/lockd.h +++ b/usr.sbin/rpc.lockd/lockd.h @@ -1,4 +1,4 @@ -/* $NetBSD: lockd.h,v 1.2 2000/06/07 14:34:40 bouyer Exp $ */ +/* $NetBSD: lockd.h,v 1.3 2018/01/23 21:06:25 sevan Exp $ */ /* * Copyright (c) 1995 @@ -35,4 +35,4 @@ extern int debug_level; extern int grace_expired; -void sigchild_handler __P((int)); +void sigchild_handler(int); diff --git a/usr.sbin/rpc.pcnfsd/extern.h b/usr.sbin/rpc.pcnfsd/extern.h index ee10d88520c8..db1ba34ed147 100644 --- a/usr.sbin/rpc.pcnfsd/extern.h +++ b/usr.sbin/rpc.pcnfsd/extern.h @@ -1,36 +1,36 @@ -/* $NetBSD: extern.h,v 1.3 2014/03/29 18:54:36 apb Exp $ */ +/* $NetBSD: extern.h,v 1.4 2018/01/23 21:06:25 sevan Exp $ */ extern int interrupted; extern pr_list printers; extern pr_queue queue; extern char sp_name[1024]; -void add_printer_alias __P((char *, char *, char *)); -void add_cache_entry __P((struct passwd *)); -int build_pr_list __P((void)); -pirstat build_pr_queue __P((printername, username, int, int *, int *)); -int check_cache __P((char *, char *, int *, int *)); -void free_mapreq_results __P((mapreq_res)); -void fillin_extra_groups __P((char *, u_int, int *, u_int[])); +void add_printer_alias(char *, char *, char *); +void add_cache_entry(struct passwd *); +int build_pr_list(void); +pirstat build_pr_queue(printername, username, int, int *, int *); +int check_cache(char *, char *, int *, int *); +void free_mapreq_results(mapreq_res); +void fillin_extra_groups(char *, u_int, int *, u_int[]); #ifdef USE_YP -char *find_entry __P((const char *, const char *)); +char *find_entry(const char *, const char *); #endif -void free_pr_list_item __P((pr_list)); -void free_pr_queue_item __P((pr_queue)); -struct passwd *get_password __P((char *)); -pirstat get_pr_status __P((printername, bool_t *, bool_t *, int *, - bool_t *, char *, size_t)); -void *grab __P((int)); -pcrstat pr_cancel __P((char *, char *, char *)); -pirstat pr_init __P((char *, char *, char **)); -psrstat pr_start __P((void)); -psrstat pr_start2 __P((char *, char *, char *, char *, char *, - char **)); -void run_ps630 __P((char *, char *)); -void scramble __P((char *, char *)); -int strembedded __P((const char *, const char *)); -FILE *su_popen __P((char *, char *, int)); -int su_pclose __P((FILE *)); +void free_pr_list_item(pr_list); +void free_pr_queue_item(pr_queue); +struct passwd *get_password(char *); +pirstat get_pr_status(printername, bool_t *, bool_t *, int *, + bool_t *, char *, size_t); +void *grab(int); +pcrstat pr_cancel(char *, char *, char *); +pirstat pr_init(char *, char *, char **); +psrstat pr_start(void); +psrstat pr_start2(char *, char *, char *, char *, char *, + char **); +void run_ps630(char *, char *); +void scramble(char *, char *); +int strembedded(const char *, const char *); +FILE *su_popen(char *, char *, int); +int su_pclose(FILE *); #ifdef WTMP -void wlogin __P((char *, struct svc_req *)); +void wlogin(char *, struct svc_req *); #endif diff --git a/usr.sbin/rpc.pcnfsd/pcnfsd_cache.c b/usr.sbin/rpc.pcnfsd/pcnfsd_cache.c index 610d08440b32..f37cb8627e2c 100644 --- a/usr.sbin/rpc.pcnfsd/pcnfsd_cache.c +++ b/usr.sbin/rpc.pcnfsd/pcnfsd_cache.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_cache.c,v 1.4 2003/07/16 08:22:01 itojun Exp $ */ +/* $NetBSD: pcnfsd_cache.c,v 1.5 2018/01/23 21:06:25 sevan Exp $ */ /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_cache.c 1.1 91/09/03 12:45:14 SMI */ /* @@ -52,11 +52,7 @@ struct cache { int -check_cache(name, pw, p_uid, p_gid) - char *name; - char *pw; - int *p_uid; - int *p_gid; +check_cache(char *name, char *pw, int *p_uid, int *p_gid) { int i; int c1, c2; @@ -80,8 +76,7 @@ check_cache(name, pw, p_uid, p_gid) } void -add_cache_entry(p) - struct passwd *p; +add_cache_entry(struct passwd *p) { int i; diff --git a/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c b/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c index 7f0f1c63fe8f..bbee56f975b1 100644 --- a/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c +++ b/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_misc.c,v 1.15 2012/11/04 22:26:04 christos Exp $ */ +/* $NetBSD: pcnfsd_misc.c,v 1.16 2018/01/23 21:06:25 sevan Exp $ */ /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_misc.c 1.5 92/01/24 19:59:13 SMI */ /* @@ -67,10 +67,10 @@ int wtmp_enabled = 1; char tempstr[256]; -char *mapfont __P((char, char, char)); -void myhandler __P((int)); -void start_watchdog __P((int)); -void stop_watchdog __P((void)); +char *mapfont(char, char, char); +void myhandler(int); +void start_watchdog(int); +void stop_watchdog(void); /* **===================================================================== @@ -85,9 +85,7 @@ void stop_watchdog __P((void)); void -scramble(s1, s2) - char *s1; - char *s2; +scramble(char *s1, char *s2) { while (*s1) { *s2++ = (*s1 ^ zchar) & 0x7f; @@ -99,8 +97,7 @@ scramble(s1, s2) struct passwd * -get_password(usrnam) - char *usrnam; +get_password(char *usrnam) { struct passwd *p; static struct passwd localp; @@ -238,9 +235,7 @@ finis: return (&fontname[0]); /* #define PS630_IS_BROKEN 1 */ void -run_ps630(f, opts) - char *f; - char *opts; +run_ps630(char *f, char *opts) { char temp_file[256]; char commbuf[256]; @@ -298,9 +293,7 @@ run_ps630(f, opts) #ifdef WTMP void -wlogin(name, req) - char *name; - struct svc_req *req; +wlogin(char *name, struct svc_req *req) { struct sockaddr_in *who; struct hostent *hp; @@ -357,8 +350,7 @@ int interrupted = 0; static FILE *pipe_handle; void -myhandler(dummy) - int dummy; +myhandler(int dummy) { interrupted = 1; fclose(pipe_handle); @@ -367,8 +359,7 @@ myhandler(dummy) } void -start_watchdog(n) - int n; +start_watchdog(int n) { /* * Setup SIGALRM handler, force interrupt of ongoing syscall @@ -414,10 +405,7 @@ stop_watchdog() } FILE * -su_popen(user, cmd, maxtime) - char *user; - char *cmd; - int maxtime; +su_popen(char *user, char *cmd, int maxtime) { int p[2]; int parent_fd, child_fd, pid; @@ -475,8 +463,7 @@ su_popen(user, cmd, maxtime) } int -su_pclose(ptr) - FILE *ptr; +su_pclose(FILE *ptr) { int pid, status; @@ -579,9 +566,7 @@ main(int argc, char *argv[]) */ int -strembedded(s1, s2) - const char *s1; - const char *s2; +strembedded(const char *s1, const char *s2) { while (*s2) { if (!strcasecmp(s1, s2)) diff --git a/usr.sbin/rpc.pcnfsd/pcnfsd_print.c b/usr.sbin/rpc.pcnfsd/pcnfsd_print.c index 253df4f78f04..e87139b48f68 100644 --- a/usr.sbin/rpc.pcnfsd/pcnfsd_print.c +++ b/usr.sbin/rpc.pcnfsd/pcnfsd_print.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_print.c,v 1.13 2014/03/29 18:54:36 apb Exp $ */ +/* $NetBSD: pcnfsd_print.c,v 1.14 2018/01/23 21:06:25 sevan Exp $ */ /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_print.c 1.7 92/01/24 19:58:58 SMI */ /* @@ -75,12 +75,12 @@ #define SIZECOL 62 #define FILECOL 24 -char *expand_alias __P((char *, char *, char *, char *)); -pr_list list_virtual_printers __P((void)); -char *map_printer_name __P((char *)); -void substitute __P((char *, const char *, const char *)); -int suspicious __P((char *)); -int valid_pr __P((char *)); +char *expand_alias(char *, char *, char *, char *); +pr_list list_virtual_printers(void); +char *map_printer_name(char *); +void substitute(char *, const char *, const char *); +int suspicious(char *); +int valid_pr(char *); /* **--------------------------------------------------------------------- @@ -114,8 +114,7 @@ pr_queue queue = NULL; */ int -suspicious(s) - char *s; +suspicious(char *s) { if (strpbrk(s, ";|&<>`'#!?*()[]^/${}\n\r\"\\:") != NULL) return 1; @@ -124,8 +123,7 @@ suspicious(s) int -valid_pr(pr) - char *pr; +valid_pr(char *pr) { char *p; pr_list curr; @@ -155,10 +153,7 @@ valid_pr(pr) * doing a chmod on something that could be a symlink... */ pirstat -pr_init(sys, pr, sp) - char *sys; - char *pr; - char **sp; +pr_init(char *sys, char *pr, char **sp) { int dir_mode = 0777; int rc; @@ -208,13 +203,7 @@ badspool: return (PI_RES_OK); } psrstat -pr_start2(sys, pr, user, fname, opts, id) - char *sys; - char *pr; - char *user; - char *fname; - char *opts; - char **id; +pr_start2(char *sys, char *pr, char *user, char *fname, char *opts, char **id) { char snum[20]; static char req_id[256]; @@ -588,8 +577,7 @@ build_pr_list() #endif /* SVR4 */ void * -grab(n) - int n; +grab(int n) { void *p; @@ -602,8 +590,7 @@ grab(n) } void -free_pr_list_item(curr) - pr_list curr; +free_pr_list_item(pr_list curr) { if (curr->pn) free(curr->pn); @@ -649,12 +636,7 @@ free_pr_list_item(curr) **/ pirstat -build_pr_queue(pn, user, just_mine, p_qlen, p_qshown) - printername pn; - username user; - int just_mine; - int *p_qlen; - int *p_qshown; +build_pr_queue(printername pn, username user, int just_mine, int p_qlen, int p_qshown) { pr_queue last = NULL; pr_queue curr = NULL; @@ -730,12 +712,7 @@ build_pr_queue(pn, user, just_mine, p_qlen, p_qshown) #else /* SVR4 */ pirstat -build_pr_queue(pn, user, just_mine, p_qlen, p_qshown) - printername pn; - username user; - int just_mine; - int *p_qlen; - int *p_qshown; +build_pr_queue(printername pn, username user, int just_mine, int *p_qlen, int *p_qshown) { pr_queue last = NULL; pr_queue curr = NULL; @@ -834,8 +811,7 @@ build_pr_queue(pn, user, just_mine, p_qlen, p_qshown) #endif /* SVR4 */ void -free_pr_queue_item(curr) - pr_queue curr; +free_pr_queue_item(pr_queue curr) { if (curr->id) free(curr->id); @@ -904,14 +880,7 @@ free_pr_queue_item(curr) */ pirstat -get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen) - printername pn; - bool_t *avail; - bool_t *printing; - int *qlen; - bool_t *needs_operator; - char *status; - size_t statuslen; +get_pr_status(printername pn, bool_t *avail, bool_t *printing, int *qlen, bool_t *needs_operator, char *status, size_t statuslen) { char buff[256]; char cmd[64]; @@ -969,14 +938,7 @@ get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen) * BSD way: lpc status */ pirstat -get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen) - printername pn; - bool_t *avail; - bool_t *printing; - int *qlen; - bool_t *needs_operator; - char *status; - size_t statuslen; +get_pr_status(printername pn, bool_t *avail, bool_t *printing, int *qlen, bool_t *needs_operator, char *status, size_t statuslen) { char cmd[128]; char buff[256]; @@ -1106,10 +1068,7 @@ get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen) ** messages are localized..... :-( */ pcrstat -pr_cancel(pr, user, id) - char *pr; - char *user; - char *id; +pr_cancel(char *pr, char *user, char *id) { char cmdbuf[256]; char resbuf[256]; @@ -1154,10 +1113,7 @@ pr_cancel(pr, user, id) * BSD way: lprm */ pcrstat -pr_cancel(pr, user, id) - char *pr; - char *user; - char *id; +pr_cancel(char *pr, char *user, char *id) { char cmdbuf[256]; char resbuf[256]; @@ -1246,10 +1202,7 @@ struct { } alias[NPRINTERDEFS]; void -add_printer_alias(printer, alias_for, command) - char *printer; - char *alias_for; - char *command; +add_printer_alias(char *printer, char *alias_for, char *command) { size_t l; @@ -1305,8 +1258,7 @@ list_virtual_printers() char * -map_printer_name(printer) - char *printer; +map_printer_name(char *printer) { int i; for (i = 0; i < num_aliases; i++) { @@ -1317,10 +1269,7 @@ map_printer_name(printer) } void -substitute(string, token, data) - char *string; - const char *token; - const char *data; +substitute(char *string, const char *token, const char *data) { char temp[512]; char *c; @@ -1336,11 +1285,7 @@ substitute(string, token, data) } char * -expand_alias(printer, file, user, host) - char *printer; - char *file; - char *user; - char *host; +expand_alias(char *printer, char *file, char *user, char *host) { static char expansion[512]; int i; diff --git a/usr.sbin/rpc.pcnfsd/pcnfsd_test.c b/usr.sbin/rpc.pcnfsd/pcnfsd_test.c index 8fdbfe39bed5..e5063163ed29 100644 --- a/usr.sbin/rpc.pcnfsd/pcnfsd_test.c +++ b/usr.sbin/rpc.pcnfsd/pcnfsd_test.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_test.c,v 1.3 2003/07/16 08:22:01 itojun Exp $ */ +/* $NetBSD: pcnfsd_test.c,v 1.4 2018/01/23 21:06:25 sevan Exp $ */ /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_test.c 1.2 92/01/27 18:00:39 SMI */ #include @@ -18,10 +18,8 @@ void free_pr_queue_item(); void good(); void bad(); - -main(argc, argv) -int argc; -char *argv[]; +int +main(int argc, char *argv[]) { char *host_name; @@ -99,9 +97,7 @@ char *transport = "udp"; #define zchar 0x5b void -scramble(s1, s2) -char *s1; -char *s2; +scramble(char *s1, char *s2) { while (*s1) { @@ -151,10 +147,7 @@ int i; return(0); } -test_v2_auth(host_name, user_name , pwrd) -char *host_name; -char *user_name; -char *pwrd; +test_v2_auth(char *host_name, char *user_name , char *pwrd) { v2_auth_args a; v2_auth_results *rp; @@ -202,9 +195,7 @@ int i; return(0); } -test_v2_init(host_name, printer) -char *host_name; -char *printer; +test_v2_init(char *host_name, char *printer) { v2_pr_init_args a; v2_pr_init_results *rp; @@ -232,12 +223,7 @@ v2_pr_init_results *rp; } -test_v2_start(host_name, printer, user_name, tag1, tag2) -char *host_name; -char *printer; -char *user_name; -char *tag1; -char *tag2; +test_v2_start(char *host_name, char *printer, char *user_name, char *tag1, char *tag2) { v2_pr_start_args a; v2_pr_start_results *rp; @@ -289,11 +275,7 @@ FILE *fp; } -test_v2_cancel(host_name, printer, user_name, id) -char *host_name; -char *printer; -char *user_name; -char *id; +test_v2_cancel(char *host_name, char *printer, char *user_name, char *id) { v2_pr_cancel_args a; v2_pr_cancel_results *rp; @@ -362,8 +344,7 @@ pr_list curr; void -free_pr_list_item(curr) -pr_list curr; +free_pr_list_item(pr_list curr) { if(curr->pn) free(curr->pn); @@ -380,10 +361,7 @@ pr_list curr; -test_v2_queue(printer, user_name, private) -char *printer; -char *user_name; -int private; +test_v2_queue(char *printer, char *user_name, int private) { struct v2_pr_queue_args a; v2_pr_queue_results *rp; @@ -432,8 +410,7 @@ pr_queue curr; void -free_pr_queue_item(curr) -pr_queue curr; +free_pr_queue_item(pr_queue curr) { if(curr->id) free(curr->id); @@ -456,8 +433,7 @@ pr_queue curr; -test_v2_stat(printer) -char *printer; +test_v2_stat(char *printer) { v2_pr_status_args a; v2_pr_status_results *rp; @@ -491,11 +467,7 @@ v2_pr_status_results *rp; return(0); } -struct mapreq_arg_item * make_mapreq_entry(t, i, n, next) -mapreq t; -int i; -char *n; -struct mapreq_arg_item *next; +struct mapreq_arg_item * make_mapreq_entry(mapreq t, int i, char *n, struct mapreq_arg_item *next) { struct mapreq_arg_item *x; x = (struct mapreq_arg_item *)malloc(sizeof(struct mapreq_arg_item)); @@ -559,8 +531,7 @@ printf("********************************************************\n"); } void -bad(reason) -char *reason; +bad(char *reason) { printf("\n"); printf("********************************************************\n"); diff --git a/usr.sbin/rpc.pcnfsd/pcnfsd_v1.c b/usr.sbin/rpc.pcnfsd/pcnfsd_v1.c index 9fc946705411..9cfb8a2eeb23 100644 --- a/usr.sbin/rpc.pcnfsd/pcnfsd_v1.c +++ b/usr.sbin/rpc.pcnfsd/pcnfsd_v1.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_v1.c,v 1.4 2011/08/31 16:24:59 plunky Exp $ */ +/* $NetBSD: pcnfsd_v1.c,v 1.5 2018/01/23 21:06:25 sevan Exp $ */ /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_v1.c 1.1 91/09/03 12:41:50 SMI */ /* @@ -61,18 +61,14 @@ int buggit = 0; /*ARGSUSED*/ void * -pcnfsd_null_1_svc(arg, req) - void *arg; - struct svc_req *req; +pcnfsd_null_1_svc(void *arg, struct svc_req *req) { static char dummy; return ((void *) &dummy); } auth_results * -pcnfsd_auth_1_svc(arg, req) - auth_args *arg; - struct svc_req *req; +pcnfsd_auth_1_svc(auth_args *arg, struct svc_req *req) { static auth_results r; @@ -124,9 +120,7 @@ pcnfsd_auth_1_svc(arg, req) } pr_init_results * -pcnfsd_pr_init_1_svc(pi_arg, req) - pr_init_args *pi_arg; - struct svc_req *req; +pcnfsd_pr_init_1_svc(pr_init_args *pi_arg, struct svc_req *req) { static pr_init_results pi_res; @@ -137,9 +131,7 @@ pcnfsd_pr_init_1_svc(pi_arg, req) } pr_start_results * -pcnfsd_pr_start_1_svc(ps_arg, req) - pr_start_args *ps_arg; - struct svc_req *req; +pcnfsd_pr_start_1_svc(pr_start_args *ps_arg, struct svc_req *req) { static pr_start_results ps_res; char *dummyptr; diff --git a/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c b/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c index 4f37c5bb9f97..b773c49f9180 100644 --- a/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c +++ b/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_v2.c,v 1.13 2014/03/29 18:54:36 apb Exp $ */ +/* $NetBSD: pcnfsd_v2.c,v 1.14 2018/01/23 21:06:25 sevan Exp $ */ /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_v2.c 1.2 91/12/18 13:26:13 SMI */ /* @@ -63,18 +63,14 @@ static char pcnfsd_version[] = "@(#)pcnfsd_v2.c 1.2 - rpc.pcnfsd V2.0 (c) 1991 S /*ARGSUSED*/ void * -pcnfsd2_null_2_svc(arg, req) - void *arg; - struct svc_req *req; +pcnfsd2_null_2_svc(void *arg, struct svc_req *req) { static char dummy; return ((void *) &dummy); } v2_auth_results * -pcnfsd2_auth_2_svc(arg, req) - v2_auth_args *arg; - struct svc_req *req; +pcnfsd2_auth_2_svc(v2_auth_args *arg, struct svc_req *req) { static v2_auth_results r; @@ -168,9 +164,7 @@ pcnfsd2_auth_2_svc(arg, req) } v2_pr_init_results * -pcnfsd2_pr_init_2_svc(arg, req) - v2_pr_init_args *arg; - struct svc_req *req; +pcnfsd2_pr_init_2_svc(v2_pr_init_args *arg, struct svc_req *req) { static v2_pr_init_results res; @@ -183,9 +177,7 @@ pcnfsd2_pr_init_2_svc(arg, req) } v2_pr_start_results * -pcnfsd2_pr_start_2_svc(arg, req) - v2_pr_start_args *arg; - struct svc_req *req; +pcnfsd2_pr_start_2_svc(v2_pr_start_args *arg, struct svc_req *req) { static v2_pr_start_results res; @@ -198,9 +190,7 @@ pcnfsd2_pr_start_2_svc(arg, req) } /*ARGSUSED*/ v2_pr_list_results * -pcnfsd2_pr_list_2_svc(arg, req) - void *arg; - struct svc_req *req; +pcnfsd2_pr_list_2_svc(void *arg, struct svc_req *req) { static v2_pr_list_results res; @@ -213,9 +203,7 @@ pcnfsd2_pr_list_2_svc(arg, req) } v2_pr_queue_results * -pcnfsd2_pr_queue_2_svc(arg, req) - v2_pr_queue_args *arg; - struct svc_req *req; +pcnfsd2_pr_queue_2_svc(v2_pr_queue_args *arg, struct svc_req *req) { static v2_pr_queue_results res; @@ -230,9 +218,7 @@ pcnfsd2_pr_queue_2_svc(arg, req) } v2_pr_status_results * -pcnfsd2_pr_status_2_svc(arg, req) - v2_pr_status_args *arg; - struct svc_req *req; +pcnfsd2_pr_status_2_svc(v2_pr_status_args *arg, struct svc_req *req) { static v2_pr_status_results res; static char status[128]; @@ -246,9 +232,7 @@ pcnfsd2_pr_status_2_svc(arg, req) } v2_pr_cancel_results * -pcnfsd2_pr_cancel_2_svc(arg, req) - v2_pr_cancel_args *arg; - struct svc_req *req; +pcnfsd2_pr_cancel_2_svc(v2_pr_cancel_args *arg, struct svc_req *req) { static v2_pr_cancel_results res; @@ -259,9 +243,7 @@ pcnfsd2_pr_cancel_2_svc(arg, req) } /*ARGSUSED*/ v2_pr_requeue_results * -pcnfsd2_pr_requeue_2_svc(arg, req) - v2_pr_requeue_args *arg; - struct svc_req *req; +pcnfsd2_pr_requeue_2_svc(v2_pr_requeue_args *arg, struct svc_req *req) { static v2_pr_requeue_results res; res.stat = PC_RES_FAIL; @@ -271,9 +253,7 @@ pcnfsd2_pr_requeue_2_svc(arg, req) } /*ARGSUSED*/ v2_pr_hold_results * -pcnfsd2_pr_hold_2_svc(arg, req) - v2_pr_hold_args *arg; - struct svc_req *req; +pcnfsd2_pr_hold_2_svc(v2_pr_hold_args *arg, struct svc_req *req) { static v2_pr_hold_results res; @@ -284,9 +264,7 @@ pcnfsd2_pr_hold_2_svc(arg, req) } /*ARGSUSED*/ v2_pr_release_results * -pcnfsd2_pr_release_2_svc(arg, req) - v2_pr_release_args *arg; - struct svc_req *req; +pcnfsd2_pr_release_2_svc(v2_pr_release_args *arg, struct svc_req *req) { static v2_pr_release_results res; @@ -297,9 +275,7 @@ pcnfsd2_pr_release_2_svc(arg, req) } /*ARGSUSED*/ v2_pr_admin_results * -pcnfsd2_pr_admin_2_svc(arg, req) - v2_pr_admin_args *arg; - struct svc_req *req; +pcnfsd2_pr_admin_2_svc(v2_pr_admin_args *arg, struct svc_req *req) { static v2_pr_admin_results res; /* @@ -316,8 +292,7 @@ pcnfsd2_pr_admin_2_svc(arg, req) } void -free_mapreq_results(p) - mapreq_res p; +free_mapreq_results(mapreq_res p) { if (p->mapreq_next) free_mapreq_results(p->mapreq_next); /* recurse */ @@ -327,11 +302,10 @@ free_mapreq_results(p) return; } -static char *my_strdup __P((const char *)); +static char *my_strdup(const char *); static char * -my_strdup(s) - const char *s; +my_strdup(const char *s) { size_t len; char *r; @@ -342,9 +316,7 @@ my_strdup(s) } v2_mapid_results * -pcnfsd2_mapid_2_svc(arg, req) - v2_mapid_args *arg; - struct svc_req *req; +pcnfsd2_mapid_2_svc(v2_mapid_args *arg, struct svc_req *req) { static v2_mapid_results res; struct passwd *p_passwd; @@ -419,9 +391,7 @@ pcnfsd2_mapid_2_svc(arg, req) /*ARGSUSED*/ v2_alert_results * -pcnfsd2_alert_2_svc(arg, req) - v2_alert_args *arg; - struct svc_req *req; +pcnfsd2_alert_2_svc(v2_alert_args *arg, struct svc_req *req) { static v2_alert_results res; @@ -432,9 +402,7 @@ pcnfsd2_alert_2_svc(arg, req) } /*ARGSUSED*/ v2_info_results * -pcnfsd2_info_2_svc(arg, req) - v2_info_args *arg; - struct svc_req *req; +pcnfsd2_info_2_svc(v2_info_args *arg, struct svc_req *req) { static v2_info_results res; static int facilities[FACILITIESMAX]; @@ -474,11 +442,7 @@ pcnfsd2_info_2_svc(arg, req) void -fillin_extra_groups(uname, main_gid, len, extra_gids) - char *uname; - gid_t main_gid; - int *len; - gid_t extra_gids[EXTRAGIDLEN]; +fillin_extra_groups(char *uname, gid_t main_gid, int *len, gid_t extra_gids[EXTRAGIDLEN]) { struct group *grp; __aconst char *__aconst *members; @@ -513,9 +477,7 @@ fillin_extra_groups(uname, main_gid, len, extra_gids) * is responsible for free()ing the result string. */ char * -find_entry(key, map) - const char *key; - const char *map; +find_entry(const char *key, const char *map) { int err; char *val = NULL; diff --git a/usr.sbin/rpc.statd/stat_proc.c b/usr.sbin/rpc.statd/stat_proc.c index 2d8198b3cec4..bdb980ae0749 100644 --- a/usr.sbin/rpc.statd/stat_proc.c +++ b/usr.sbin/rpc.statd/stat_proc.c @@ -1,4 +1,4 @@ -/* $NetBSD: stat_proc.c,v 1.8 2009/04/18 13:04:50 lukem Exp $ */ +/* $NetBSD: stat_proc.c,v 1.9 2018/01/23 21:06:26 sevan Exp $ */ /* * Copyright (c) 1995 @@ -35,7 +35,7 @@ #include #ifndef lint -__RCSID("$NetBSD: stat_proc.c,v 1.8 2009/04/18 13:04:50 lukem Exp $"); +__RCSID("$NetBSD: stat_proc.c,v 1.9 2018/01/23 21:06:26 sevan Exp $"); #endif #include @@ -58,9 +58,7 @@ __RCSID("$NetBSD: stat_proc.c,v 1.8 2009/04/18 13:04:50 lukem Exp $"); * an address. */ struct sm_stat_res * -sm_stat_1_svc(arg, req) - sm_name *arg; - struct svc_req *req; +sm_stat_1_svc(sm_name *arg, struct svc_req *req) { static sm_stat_res smres; struct addrinfo *ai; @@ -92,9 +90,7 @@ sm_stat_1_svc(arg, req) * valid (as judged by gethostbyname()) */ struct sm_stat_res * -sm_mon_1_svc(arg, req) - mon *arg; - struct svc_req *req; +sm_mon_1_svc(mon *arg, struct svc_req *req) { static sm_stat_res smres; struct addrinfo *ai; @@ -158,10 +154,7 @@ sm_mon_1_svc(arg, req) * request, all are removed. */ int -do_unmon(name, hp, ptr) - char *name; - HostInfo *hp; - void *ptr; +do_unmon(char *name, HostInfo *hp, void *ptr) { my_id *idp = ptr; MonList *lp, *next; @@ -199,9 +192,7 @@ do_unmon(name, hp, ptr) * earlier call to sm_mon_1 */ struct sm_stat * -sm_unmon_1_svc(arg, req) - mon_id *arg; - struct svc_req *req; +sm_unmon_1_svc(mon_id *arg, struct svc_req *req) { static sm_stat smres; HostInfo *hp, h; @@ -241,9 +232,7 @@ sm_unmon_1_svc(arg, req) * host and program number. */ struct sm_stat * -sm_unmon_all_1_svc(arg, req) - my_id *arg; - struct svc_req *req; +sm_unmon_all_1_svc(my_id *arg, struct svc_req *req) { static sm_stat smres; @@ -277,9 +266,7 @@ sm_unmon_all_1_svc(arg, req) * and inform all hosts on the monitor list. */ void * -sm_simu_crash_1_svc(v, req) - void *v; - struct svc_req *req; +sm_simu_crash_1_svc(void *v, struct svc_req *req) { static char dummy; @@ -310,9 +297,7 @@ sm_simu_crash_1_svc(v, req) * that modify the list. */ void * -sm_notify_1_svc(arg, req) - stat_chge *arg; - struct svc_req *req; +sm_notify_1_svc(stat_chge *arg, struct svc_req *req) { struct timeval timeout = {20, 0}; /* 20 secs timeout */ CLIENT *cli; diff --git a/usr.sbin/rpc.statd/statd.c b/usr.sbin/rpc.statd/statd.c index 20661efc4707..1c41a0ff1311 100644 --- a/usr.sbin/rpc.statd/statd.c +++ b/usr.sbin/rpc.statd/statd.c @@ -1,4 +1,4 @@ -/* $NetBSD: statd.c,v 1.31 2017/06/03 14:44:12 christos Exp $ */ +/* $NetBSD: statd.c,v 1.32 2018/01/23 21:06:26 sevan Exp $ */ /* * Copyright (c) 1995 @@ -36,7 +36,7 @@ #include #ifndef lint -__RCSID("$NetBSD: statd.c,v 1.31 2017/06/03 14:44:12 christos Exp $"); +__RCSID("$NetBSD: statd.c,v 1.32 2018/01/23 21:06:26 sevan Exp $"); #endif /* main() function for status monitor daemon. Some of the code in this */ @@ -79,22 +79,18 @@ static DBT undefkey = { /* statd.c */ -static int walk_one __P((int (*fun )__P ((DBT *, HostInfo *, void *)), DBT *, DBT *, void *)); -static int walk_db __P((int (*fun )__P ((DBT *, HostInfo *, void *)), void *)); -static int reset_host __P((DBT *, HostInfo *, void *)); -static int check_work __P((DBT *, HostInfo *, void *)); -static int unmon_host __P((DBT *, HostInfo *, void *)); -static int notify_one __P((DBT *, HostInfo *, void *)); -static void init_file __P((const char *)); -static int notify_one_host __P((const char *)); -static void die __P((int)) __dead; - -int main __P((int, char **)); +static int walk_one(int (*fun )(DBT *, HostInfo *, void *), DBT *, DBT *, void *); +static int walk_db(int (*fun )(DBT *, HostInfo *, void *), void *); +static int reset_host(DBT *, HostInfo *, void *); +static int check_work(DBT *, HostInfo *, void *); +static int unmon_host(DBT *, HostInfo *, void *); +static int notify_one(DBT *, HostInfo *, void *); +static void init_file(const char *); +static int notify_one_host(const char *); +static void die(int) __dead; int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { int ch; struct sigaction nsa; @@ -181,8 +177,7 @@ main(argc, argv) * children to exit when they have done their work. */ void -notify_handler(sig) - int sig; +notify_handler(int sig) { time_t now; @@ -241,9 +236,7 @@ bad: * */ void -change_host(hostnamep, hp) - char *hostnamep; - HostInfo *hp; +change_host(char *hostnamep, HostInfo *hp) { DBT key, data; char *ptr; @@ -282,9 +275,7 @@ change_host(hostnamep, hp) * */ HostInfo * -find_host(hostname, hp) - char *hostname; - HostInfo *hp; +find_host(char *hostname, HostInfo *hp) { DBT key, data; char *ptr; @@ -320,10 +311,7 @@ bad: * Notes: */ static int -walk_one(fun, key, data, ptr) - int (*fun) __P((DBT *, HostInfo *, void *)); - DBT *key, *data; - void *ptr; +walk_one(int (*fun)(DBT *, HostInfo *, void *), DBT *key, DBT *data, void *ptr) { HostInfo h; if (key->size == undefkey.size && @@ -344,9 +332,7 @@ walk_one(fun, key, data, ptr) * Notes: */ static int -walk_db(fun, ptr) - int (*fun) __P((DBT *, HostInfo *, void *)); - void *ptr; +walk_db(int (*fun)(DBT *, HostInfo *, void *), void *ptr) { DBT key, data; @@ -400,10 +386,7 @@ bad: * notify them before the second crash occurred. */ static int -reset_host(key, hi, ptr) - DBT *key; - HostInfo *hi; - void *ptr; +reset_host(DBT *key, HostInfo *hi, void *ptr) { if (hi->monList) { @@ -422,10 +405,7 @@ reset_host(key, hi, ptr) * Notes: */ static int -check_work(key, hi, ptr) - DBT *key; - HostInfo *hi; - void *ptr; +check_work(DBT *key, HostInfo *hi, void *ptr) { return hi->notifyReqd ? -1 : 0; } @@ -437,10 +417,7 @@ check_work(key, hi, ptr) * Notes: */ static int -unmon_host(key, hi, ptr) - DBT *key; - HostInfo *hi; - void *ptr; +unmon_host(DBT *key, HostInfo *hi, void *ptr) { char *name = key->data; @@ -456,10 +433,7 @@ unmon_host(key, hi, ptr) * Notes: */ static int -notify_one(key, hi, ptr) - DBT *key; - HostInfo *hi; - void *ptr; +notify_one(DBT *key, HostInfo *hi, void *ptr) { time_t now = *(time_t *) ptr; char *name = key->data; @@ -516,8 +490,7 @@ notify_one(key, hi, ptr) * the state number to the next even value. */ static void -init_file(filename) - const char *filename; +init_file(const char *filename) { DBT data; @@ -584,8 +557,7 @@ unmon_hosts() } static int -notify_one_host(hostname) - const char *hostname; +notify_one_host(const char *hostname) { struct timeval timeout = {20, 0}; /* 20 secs timeout */ CLIENT *cli; @@ -621,8 +593,7 @@ notify_one_host(hostname) static void -die(n) - int n; +die(int n) { (*db->close)(db); exit(n); diff --git a/usr.sbin/rpc.statd/statd.h b/usr.sbin/rpc.statd/statd.h index 252b25dd39dd..38fdae50992a 100644 --- a/usr.sbin/rpc.statd/statd.h +++ b/usr.sbin/rpc.statd/statd.h @@ -1,4 +1,4 @@ -/* $NetBSD: statd.h,v 1.2 1997/10/21 20:38:19 christos Exp $ */ +/* $NetBSD: statd.h,v 1.3 2018/01/23 21:06:26 sevan Exp $ */ /* * Copyright (c) 1995 @@ -97,23 +97,23 @@ extern Header status_info; /* Function prototypes */ /* stat_proc.c */ -struct sm_stat_res *sm_stat_1_svc __P((sm_name *, struct svc_req *)); -struct sm_stat_res *sm_mon_1_svc __P((mon *, struct svc_req *)); -struct sm_stat *sm_unmon_1_svc __P((mon_id *, struct svc_req *)); -struct sm_stat *sm_unmon_all_1_svc __P((my_id *, struct svc_req *)); -void *sm_simu_crash_1_svc __P((void *, struct svc_req *)); -void *sm_notify_1_svc __P((stat_chge *, struct svc_req *)); -int do_unmon __P((char *, HostInfo *, void *)); +struct sm_stat_res *sm_stat_1_svc(sm_name *, struct svc_req *); +struct sm_stat_res *sm_mon_1_svc(mon *, struct svc_req *); +struct sm_stat *sm_unmon_1_svc(mon_id *, struct svc_req *); +struct sm_stat *sm_unmon_all_1_svc(my_id *, struct svc_req *); +void *sm_simu_crash_1_svc(void *, struct svc_req *); +void *sm_notify_1_svc(stat_chge *, struct svc_req *); +int do_unmon(char *, HostInfo *, void *); /* statd.c */ -void notify_handler __P((int)); -void sync_file __P((void)); -void unmon_hosts __P((void)); -void change_host __P((char *, HostInfo *)); -HostInfo *find_host __P((char *, HostInfo *)); -void reset_database __P((void)); +void notify_handler(int); +void sync_file(void); +void unmon_hosts(void); +void change_host(char *, HostInfo *); +HostInfo *find_host(char *, HostInfo *); +void reset_database(void); -void sm_prog_1 __P((struct svc_req *, SVCXPRT *)); +void sm_prog_1(struct svc_req *, SVCXPRT *); #define NO_ALARM sa.sa_handler == SIG_DFL ? 0 : (sa.sa_handler = SIG_IGN, sigaction(SIGALRM, &sa, NULL)) #define ALARM sa.sa_handler == SIG_DFL ? 0 : (sa.sa_handler = notify_handler, sigaction(SIGALRM, &sa, NULL)) diff --git a/usr.sbin/rpc.statd/test.c b/usr.sbin/rpc.statd/test.c index 8c4dec38568a..9513d3ee3247 100644 --- a/usr.sbin/rpc.statd/test.c +++ b/usr.sbin/rpc.statd/test.c @@ -1,8 +1,8 @@ -/* $NetBSD: test.c,v 1.2 1997/10/17 16:03:09 lukem Exp $ */ +/* $NetBSD: test.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */ #include #ifndef lint -__RCSID("$NetBSD: test.c,v 1.2 1997/10/17 16:03:09 lukem Exp $"); +__RCSID("$NetBSD: test.c,v 1.3 2018/01/23 21:06:26 sevan Exp $"); #endif #include @@ -14,9 +14,7 @@ __RCSID("$NetBSD: test.c,v 1.2 1997/10/17 16:03:09 lukem Exp $"); static struct timeval TIMEOUT = {25, 0}; struct sm_stat_res * -sm_stat_1(argp, clnt) - struct sm_name *argp; - CLIENT *clnt; +sm_stat_1(struct sm_name *argp, CLIENT *clnt) { static struct sm_stat_res res; @@ -29,9 +27,7 @@ sm_stat_1(argp, clnt) struct sm_stat_res * -sm_mon_1(argp, clnt) - struct mon *argp; - CLIENT *clnt; +sm_mon_1(struct mon *argp, CLIENT *clnt) { static struct sm_stat_res res; @@ -44,9 +40,7 @@ sm_mon_1(argp, clnt) struct sm_stat * -sm_unmon_1(argp, clnt) - struct mon_id *argp; - CLIENT *clnt; +sm_unmon_1(struct mon_id *argp, CLIENT *clnt) { static struct sm_stat res; @@ -59,9 +53,7 @@ sm_unmon_1(argp, clnt) struct sm_stat * -sm_unmon_all_1(argp, clnt) - struct my_id *argp; - CLIENT *clnt; +sm_unmon_all_1(struct my_id *argp, CLIENT *clnt) { static struct sm_stat res; @@ -74,9 +66,7 @@ sm_unmon_all_1(argp, clnt) void * -sm_simu_crash_1(argp, clnt) - void *argp; - CLIENT *clnt; +sm_simu_crash_1(void *argp, CLIENT *clnt) { static char res; @@ -89,9 +79,7 @@ sm_simu_crash_1(argp, clnt) int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { CLIENT *cli; char dummy; diff --git a/usr.sbin/sesd/srcs/chpmon.c b/usr.sbin/sesd/srcs/chpmon.c index 49fafba7ca6e..76654add64a7 100644 --- a/usr.sbin/sesd/srcs/chpmon.c +++ b/usr.sbin/sesd/srcs/chpmon.c @@ -1,4 +1,4 @@ -/* $NetBSD: chpmon.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */ +/* $NetBSD: chpmon.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */ /* $FreeBSD: src/share/examples/ses/chpmon.c,v 1.1 2000/01/15 22:47:16 mjacob Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob @@ -48,12 +48,8 @@ #define BADSTAT \ (SES_ENCSTAT_UNRECOV|SES_ENCSTAT_CRITICAL|SES_ENCSTAT_NONCRITICAL) -int main __P((int, char **)); - int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { int fd, delay, dev; ses_encstat stat, *carray; diff --git a/usr.sbin/sesd/srcs/eltsub.c b/usr.sbin/sesd/srcs/eltsub.c index 425bb61f05f7..977ac6a33ac8 100644 --- a/usr.sbin/sesd/srcs/eltsub.c +++ b/usr.sbin/sesd/srcs/eltsub.c @@ -1,4 +1,4 @@ -/* $NetBSD: eltsub.c,v 1.3 2009/11/17 18:37:45 drochner Exp $ */ +/* $NetBSD: eltsub.c,v 1.4 2018/01/23 21:06:26 sevan Exp $ */ /* $FreeBSD: $ */ /* $OpenBSD: $ */ /* @@ -40,13 +40,12 @@ #include #include SESINC -char *geteltnm __P((int)); -static char *scode2ascii __P((u_char)); -char *stat2ascii __P((int, u_char *)); +char *geteltnm(int); +static char *scode2ascii(u_char); +char *stat2ascii(int, u_char *); char * -geteltnm(type) - int type; +geteltnm(int type) { static char rbuf[132]; @@ -159,9 +158,7 @@ scode2ascii(u_char code) char * -stat2ascii(eletype, cstat) - int eletype; - u_char *cstat; +stat2ascii(int eletype, u_char *cstat) { static char ebuf[256], *scode; diff --git a/usr.sbin/sesd/srcs/getencstat.c b/usr.sbin/sesd/srcs/getencstat.c index ece253cc5bda..9b939d03bf6e 100644 --- a/usr.sbin/sesd/srcs/getencstat.c +++ b/usr.sbin/sesd/srcs/getencstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: getencstat.c,v 1.3 2000/07/04 20:27:40 matt Exp $ */ +/* $NetBSD: getencstat.c,v 1.4 2018/01/23 21:06:26 sevan Exp $ */ /* $FreeBSD: $ */ /* $OpenBSD: $ */ /* @@ -42,14 +42,11 @@ #include #include SESINC -extern char *geteltnm __P((int)); -extern char *stat2ascii __P((int, u_char *)); -int main __P((int, char **)); +extern char *geteltnm(int); +extern char *stat2ascii(int, u_char *); int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { ses_object *objp; ses_objstat ob; diff --git a/usr.sbin/sesd/srcs/getnobj.c b/usr.sbin/sesd/srcs/getnobj.c index 9484f91cd795..183c027bdcf0 100644 --- a/usr.sbin/sesd/srcs/getnobj.c +++ b/usr.sbin/sesd/srcs/getnobj.c @@ -1,4 +1,4 @@ -/* $NetBSD: getnobj.c,v 1.3 2007/01/16 17:32:05 hubertf Exp $ */ +/* $NetBSD: getnobj.c,v 1.4 2018/01/23 21:06:26 sevan Exp $ */ /* $FreeBSD: $ */ /* $OpenBSD: $ */ /* @@ -41,12 +41,8 @@ #include #include SESINC -int main __P((int, char **)); - int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { unsigned int nobj; int fd; diff --git a/usr.sbin/sesd/srcs/getobjmap.c b/usr.sbin/sesd/srcs/getobjmap.c index 6c0a84a9b36f..8de93a92212a 100644 --- a/usr.sbin/sesd/srcs/getobjmap.c +++ b/usr.sbin/sesd/srcs/getobjmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: getobjmap.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */ +/* $NetBSD: getobjmap.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */ /* $FreeBSD: $ */ /* $OpenBSD: $ */ /* @@ -41,13 +41,10 @@ #include #include SESINC -int main __P((int, char **)); -extern char *geteltnm __P((int)); +extern char *geteltnm(int); int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { ses_object *objp; int nobj, fd, i; diff --git a/usr.sbin/sesd/srcs/getobjstat.c b/usr.sbin/sesd/srcs/getobjstat.c index 5f2a6fe73cfd..65e1b253d6d3 100644 --- a/usr.sbin/sesd/srcs/getobjstat.c +++ b/usr.sbin/sesd/srcs/getobjstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: getobjstat.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */ +/* $NetBSD: getobjstat.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */ /* $FreeBSD: $ */ /* $OpenBSD: $ */ /* @@ -40,12 +40,8 @@ #include #include SESINC -int main __P((int, char **)); - int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { int fd; int i; diff --git a/usr.sbin/sesd/srcs/inienc.c b/usr.sbin/sesd/srcs/inienc.c index d8089e29c024..bac20ccfb1e8 100644 --- a/usr.sbin/sesd/srcs/inienc.c +++ b/usr.sbin/sesd/srcs/inienc.c @@ -1,4 +1,4 @@ -/* $NetBSD: inienc.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */ +/* $NetBSD: inienc.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */ /* $FreeBSD: $ */ /* $OpenBSD: $ */ /* @@ -41,12 +41,8 @@ #include #include SESINC -int __P((int, char **)); - int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { int fd; diff --git a/usr.sbin/sesd/srcs/sesd.c b/usr.sbin/sesd/srcs/sesd.c index 3c34eca1fd04..f8594661c2f3 100644 --- a/usr.sbin/sesd/srcs/sesd.c +++ b/usr.sbin/sesd/srcs/sesd.c @@ -1,4 +1,4 @@ -/* $NetBSD: sesd.c,v 1.8 2013/04/07 18:49:35 wiz Exp $ */ +/* $NetBSD: sesd.c,v 1.9 2018/01/23 21:06:26 sevan Exp $ */ /* $FreeBSD: $ */ /* $OpenBSD: $ */ /* @@ -45,16 +45,13 @@ #define ALLSTAT (SES_ENCSTAT_UNRECOV | SES_ENCSTAT_CRITICAL | \ SES_ENCSTAT_NONCRITICAL | SES_ENCSTAT_INFO) -int main __P((int, char **)); /* * Monitor named SES devices and note (via syslog) any changes in status. */ int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { static const char usage[] = "usage: %s [-d] [-t pollinterval] device [device ...]\n"; diff --git a/usr.sbin/sesd/srcs/setencstat.c b/usr.sbin/sesd/srcs/setencstat.c index 07a8c5a67d78..e15822e6df1e 100644 --- a/usr.sbin/sesd/srcs/setencstat.c +++ b/usr.sbin/sesd/srcs/setencstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: setencstat.c,v 1.3 2009/04/18 13:57:44 lukem Exp $ */ +/* $NetBSD: setencstat.c,v 1.4 2018/01/23 21:06:26 sevan Exp $ */ /* $FreeBSD: $ */ /* $OpenBSD: $ */ /* @@ -41,12 +41,8 @@ #include #include SESINC -int main __P((int, char **)); - int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { int fd; long val; diff --git a/usr.sbin/sesd/srcs/setobjstat.c b/usr.sbin/sesd/srcs/setobjstat.c index 3d7ddce21483..dca539754d5f 100644 --- a/usr.sbin/sesd/srcs/setobjstat.c +++ b/usr.sbin/sesd/srcs/setobjstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: setobjstat.c,v 1.2 2000/02/22 06:06:10 mjacob Exp $ */ +/* $NetBSD: setobjstat.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */ /* $FreeBSD: $ */ /* $OpenBSD: $ */ /* @@ -41,12 +41,8 @@ #include #include SESINC -int main __P((int, char **)); - int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { int fd; int i; diff --git a/usr.sbin/tcpdchk/fakelog.c b/usr.sbin/tcpdchk/fakelog.c index dd5d86ff0ac4..4f94e097172e 100644 --- a/usr.sbin/tcpdchk/fakelog.c +++ b/usr.sbin/tcpdchk/fakelog.c @@ -1,4 +1,4 @@ -/* $NetBSD: fakelog.c,v 1.6 2011/07/17 20:54:55 joerg Exp $ */ +/* $NetBSD: fakelog.c,v 1.7 2018/01/23 21:06:26 sevan Exp $ */ /* * This module intercepts syslog() library calls and redirects their output @@ -12,7 +12,7 @@ #if 0 static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21"; #else -__RCSID("$NetBSD: fakelog.c,v 1.6 2011/07/17 20:54:55 joerg Exp $"); +__RCSID("$NetBSD: fakelog.c,v 1.7 2018/01/23 21:06:26 sevan Exp $"); #endif #endif @@ -27,10 +27,7 @@ __RCSID("$NetBSD: fakelog.c,v 1.6 2011/07/17 20:54:55 joerg Exp $"); /* ARGSUSED */ void -openlog(name, logopt, facility) -const char *name; -int logopt; -int facility; +openlog(const char *name, int logopt, int facility) { /* void */ } diff --git a/usr.sbin/tcpdchk/inetcf.c b/usr.sbin/tcpdchk/inetcf.c index 9da824e2c133..065eae7858c5 100644 --- a/usr.sbin/tcpdchk/inetcf.c +++ b/usr.sbin/tcpdchk/inetcf.c @@ -1,4 +1,4 @@ -/* $NetBSD: inetcf.c,v 1.10 2015/10/14 15:50:48 christos Exp $ */ +/* $NetBSD: inetcf.c,v 1.11 2018/01/23 21:06:26 sevan Exp $ */ /* * Routines to parse an inetd.conf or tlid.conf file. This would be a great @@ -12,7 +12,7 @@ #if 0 static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23"; #else -__RCSID("$NetBSD: inetcf.c,v 1.10 2015/10/14 15:50:48 christos Exp $"); +__RCSID("$NetBSD: inetcf.c,v 1.11 2018/01/23 21:06:26 sevan Exp $"); #endif #endif @@ -28,8 +28,8 @@ __RCSID("$NetBSD: inetcf.c,v 1.10 2015/10/14 15:50:48 christos Exp $"); #include "percent_m.h" #include "scaffold.h" -static void inet_chk __P((char *, char *, char *, char *)); -static char *base_name __P((char *)); +static void inet_chk(char *, char *, char *, char *); +static char *base_name(char *); /* * Programs that use libwrap directly are not in inetd.conf, and so must @@ -191,11 +191,7 @@ char *conf; /* inet_chk - examine one inetd.conf (tlid.conf?) entry */ -static void inet_chk(protocol, path, arg0, arg1) -char *protocol; -char *path; -char *arg0; -char *arg1; +static void inet_chk(char *protocol, char *path, char *arg0, char *arg1) { char daemon[BUFSIZ]; struct stat st; @@ -306,9 +302,7 @@ char *arg1; /* inet_set - remember service status */ -void inet_set(name, type) -char *name; -int type; +void inet_set(char *name, int type) { struct inet_ent *ip = (struct inet_ent *) malloc(sizeof(struct inet_ent) + strlen(name)); @@ -325,8 +319,7 @@ int type; /* inet_get - look up service status */ -int inet_get(name) -char *name; +int inet_get(char *name) { struct inet_ent *ip; @@ -342,8 +335,7 @@ char *name; /* base_name - compute last pathname component */ -static char *base_name(path) -char *path; +static char *base_name(char *path) { char *cp; diff --git a/usr.sbin/tcpdchk/inetcf.h b/usr.sbin/tcpdchk/inetcf.h index 794b4efad188..e62808417270 100644 --- a/usr.sbin/tcpdchk/inetcf.h +++ b/usr.sbin/tcpdchk/inetcf.h @@ -1,4 +1,4 @@ -/* $NetBSD: inetcf.h,v 1.3 1998/01/09 08:11:48 perry Exp $ */ +/* $NetBSD: inetcf.h,v 1.4 2018/01/23 21:06:26 sevan Exp $ */ /* * @(#) inetcf.h 1.1 94/12/28 17:42:30 @@ -6,9 +6,9 @@ * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. */ -char *inet_cfg __P((char *)); /* read inetd.conf file */ -void inet_set __P((char *, int)); /* remember internet service */ -int inet_get __P((char *)); /* look up internet service */ +char *inet_cfg(char *); /* read inetd.conf file */ +void inet_set(char *, int); /* remember internet service */ +int inet_get(char *); /* look up internet service */ #define WR_UNKNOWN (-1) /* service unknown */ #define WR_NOT 1 /* may not be wrapped */ diff --git a/usr.sbin/tcpdchk/percent_m.c b/usr.sbin/tcpdchk/percent_m.c index 3b9e9a501293..8ba8ab6bf167 100644 --- a/usr.sbin/tcpdchk/percent_m.c +++ b/usr.sbin/tcpdchk/percent_m.c @@ -1,4 +1,4 @@ -/* $NetBSD: percent_m.c,v 1.4 2000/01/21 17:08:39 mycroft Exp $ */ +/* $NetBSD: percent_m.c,v 1.5 2018/01/23 21:06:26 sevan Exp $ */ /* * Replace %m by system error message. @@ -11,7 +11,7 @@ #if 0 static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37"; #else -__RCSID("$NetBSD: percent_m.c,v 1.4 2000/01/21 17:08:39 mycroft Exp $"); +__RCSID("$NetBSD: percent_m.c,v 1.5 2018/01/23 21:06:26 sevan Exp $"); #endif #endif @@ -27,9 +27,7 @@ extern int sys_nerr; #include "mystdarg.h" #include "percent_m.h" -char *percent_m(obuf, ibuf) -char *obuf; -const char *ibuf; +char *percent_m(char *obuf, const char *ibuf) { char *bp = obuf; const char *cp = ibuf; diff --git a/usr.sbin/tcpdchk/percent_m.h b/usr.sbin/tcpdchk/percent_m.h index fc909c04c8e7..18f5e271b41c 100644 --- a/usr.sbin/tcpdchk/percent_m.h +++ b/usr.sbin/tcpdchk/percent_m.h @@ -1,4 +1,4 @@ -/* $NetBSD: percent_m.h,v 1.2 2000/10/11 20:23:57 is Exp $ */ +/* $NetBSD: percent_m.h,v 1.3 2018/01/23 21:06:26 sevan Exp $ */ -char *percent_m __P((char *, const char *)) +char *percent_m(char *, const char *) __attribute__((__format_arg__(2))); diff --git a/usr.sbin/tcpdchk/scaffold.c b/usr.sbin/tcpdchk/scaffold.c index b152d6a24b6b..ee266481d310 100644 --- a/usr.sbin/tcpdchk/scaffold.c +++ b/usr.sbin/tcpdchk/scaffold.c @@ -1,4 +1,4 @@ -/* $NetBSD: scaffold.c,v 1.11 2012/03/21 10:11:34 matt Exp $ */ +/* $NetBSD: scaffold.c,v 1.12 2018/01/23 21:06:26 sevan Exp $ */ /* * Routines for testing only. Not really industrial strength. @@ -11,7 +11,7 @@ #if 0 static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24"; #else -__RCSID("$NetBSD: scaffold.c,v 1.11 2012/03/21 10:11:34 matt Exp $"); +__RCSID("$NetBSD: scaffold.c,v 1.12 2018/01/23 21:06:26 sevan Exp $"); #endif #endif @@ -47,9 +47,7 @@ extern int rfc931_timeout; /* = RFC931_TIMEOUT; */ /* find_inet_addr - find all addresses for this host, result to free() */ -struct addrinfo *find_inet_addr(host, flags) -char *host; -int flags; +struct addrinfo *find_inet_addr(char *host, int flags) { struct addrinfo hints, *res; int error; @@ -72,8 +70,7 @@ int flags; /* check_dns - give each address thorough workout, return address count */ -int check_dns(host) -char *host; +int check_dns(char *host) { struct request_info request; struct sockaddr_storage ss; @@ -112,8 +109,7 @@ char *host; /* ARGSUSED */ -void shell_cmd(command) -char *command; +void shell_cmd(char *command) { if (hosts_access_verbose) printf("command: %s", command); @@ -123,8 +119,7 @@ char *command; /* ARGSUSED */ -void clean_exit(request) -struct request_info *request; +void clean_exit(struct request_info *request) { exit(0); } diff --git a/usr.sbin/tcpdchk/tcpdchk.c b/usr.sbin/tcpdchk/tcpdchk.c index fa2b45cd1a49..9455bd8b1fa1 100644 --- a/usr.sbin/tcpdchk/tcpdchk.c +++ b/usr.sbin/tcpdchk/tcpdchk.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcpdchk.c,v 1.12 2012/03/21 10:11:34 matt Exp $ */ +/* $NetBSD: tcpdchk.c,v 1.13 2018/01/23 21:06:26 sevan Exp $ */ /* * tcpdchk - examine all tcpd access control rules and inetd.conf entries @@ -21,7 +21,7 @@ #if 0 static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25"; #else -__RCSID("$NetBSD: tcpdchk.c,v 1.12 2012/03/21 10:11:34 matt Exp $"); +__RCSID("$NetBSD: tcpdchk.c,v 1.13 2018/01/23 21:06:26 sevan Exp $"); #endif #endif @@ -91,8 +91,6 @@ static int check_inet_addr(char *); static int check_host(char *); static int reserved_name(char *); -int main(int, char **); - #define PERMIT 1 #define DENY 0 @@ -281,9 +279,7 @@ parse_table(const char *table, struct request_info *request) /* print_list - pretty-print a list */ -static void print_list(title, list) -char *title; -char *list; +static void print_list(char *title, char *list) { char buf[BUFLEN]; char *cp; @@ -303,8 +299,7 @@ char *list; /* check_daemon_list - criticize daemon list */ -static void check_daemon_list(list) -char *list; +static void check_daemon_list(char *list) { char buf[BUFLEN]; char *cp; @@ -331,8 +326,7 @@ char *list; /* check_client_list - criticize client list */ -static void check_client_list(list) -char *list; +static void check_client_list(char *list) { char buf[BUFLEN]; char *cp; @@ -370,8 +364,7 @@ char *list; /* check_daemon - criticize daemon pattern */ -static void check_daemon(pat) -char *pat; +static void check_daemon(char *pat) { if (pat[0] == '@') { tcpd_warn("%s: daemon name begins with \"@\"", pat); @@ -402,8 +395,7 @@ char *pat; /* check_user - criticize user pattern */ -static void check_user(pat) -char *pat; +static void check_user(char *pat) { if (pat[0] == '@') { /* @netgroup */ tcpd_warn("%s: user name begins with \"@\"", pat); @@ -423,8 +415,7 @@ char *pat; } #ifdef INET6 -static int check_inet_addr(pat) -char *pat; +static int check_inet_addr(char *pat) { struct addrinfo *res; @@ -438,8 +429,7 @@ char *pat; #endif /* check_host - criticize host pattern */ -static int check_host(pat) -char *pat; +static int check_host(char *pat) { char *mask; int addr_count = 1; @@ -502,8 +492,7 @@ char *pat; /* reserved_name - determine if name is reserved */ -static int reserved_name(pat) -char *pat; +static int reserved_name(char *pat) { return (STR_EQ(pat, unknown) || STR_EQ(pat, "KNOWN") diff --git a/usr.sbin/tcpdmatch/tcpdmatch.c b/usr.sbin/tcpdmatch/tcpdmatch.c index 2f1bbab95e0b..e64038ef571c 100644 --- a/usr.sbin/tcpdmatch/tcpdmatch.c +++ b/usr.sbin/tcpdmatch/tcpdmatch.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcpdmatch.c,v 1.8 2002/06/07 00:00:19 itojun Exp $ */ +/* $NetBSD: tcpdmatch.c,v 1.9 2018/01/23 21:06:26 sevan Exp $ */ /* * tcpdmatch - explain what tcpd would do in a specific case @@ -20,7 +20,7 @@ #if 0 static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36"; #else -__RCSID("$NetBSD: tcpdmatch.c,v 1.8 2002/06/07 00:00:19 itojun Exp $"); +__RCSID("$NetBSD: tcpdmatch.c,v 1.9 2018/01/23 21:06:26 sevan Exp $"); #endif #endif @@ -53,16 +53,13 @@ __RCSID("$NetBSD: tcpdmatch.c,v 1.8 2002/06/07 00:00:19 itojun Exp $"); #include "inetcf.h" #include "scaffold.h" -static void usage __P((char *)); -static void expand __P((char *, char *, struct request_info *)); -static void tcpdmatch __P((struct request_info *)); -int main __P((int, char **)); +static void usage(char *); +static void expand(char *, char *, struct request_info *); +static void tcpdmatch(struct request_info *); /* The main program */ -int main(argc, argv) -int argc; -char **argv; +int main(int argc, char *argv[]) { struct addrinfo *res, *res0; char *myname = argv[0]; @@ -269,8 +266,7 @@ char **argv; /* Explain how to use this program */ -static void usage(myname) -char *myname; +static void usage(char *myname) { fprintf(stderr, "usage: %s [-d] [-i inet_conf] daemon[@host] [user@]host\n", myname); @@ -281,10 +277,7 @@ char *myname; /* Print interesting expansions */ -static void expand(text, pattern, request) -char *text; -char *pattern; -struct request_info *request; +static void expand(char *text, char *pattern, struct request_info *request) { char buf[BUFSIZ]; @@ -294,8 +287,7 @@ struct request_info *request; /* Try out a (server,client) pair */ -static void tcpdmatch(request) -struct request_info *request; +static void tcpdmatch(struct request_info *request) { int verdict; diff --git a/usr.sbin/videomode/videomode.c b/usr.sbin/videomode/videomode.c index a278368f2be4..3bc5be6f1aa4 100644 --- a/usr.sbin/videomode/videomode.c +++ b/usr.sbin/videomode/videomode.c @@ -1,4 +1,4 @@ -/* $NetBSD: videomode.c,v 1.8 2011/01/04 10:32:34 wiz Exp $ */ +/* $NetBSD: videomode.c,v 1.9 2018/01/23 21:06:26 sevan Exp $ */ /* * Copyright (c) 1995 Christian E. Hopps @@ -45,17 +45,14 @@ #include #include -void dump_mode __P((int)); -void dump_vm __P((struct grfvideo_mode *)); -int get_grf __P((void)); -int main __P((int, char **)); -void set_mode __P((int)); -void usage __P((void)); +void dump_mode(int); +void dump_vm(struct grfvideo_mode *); +int get_grf(void); +void set_mode(int); +void usage(void) __dead; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int m; int c; @@ -112,8 +109,7 @@ get_grf() } void -dump_mode(m) - int m; +dump_mode(int m) { struct grfvideo_mode vm; int num_vm; @@ -146,8 +142,7 @@ dump_mode(m) } void -set_mode(m) - int m; +set_mode(int m) { int grffd; @@ -157,8 +152,7 @@ set_mode(m) } void -dump_vm(vm) - struct grfvideo_mode *vm; +dump_vm(struct grfvideo_mode *vm) { (void)printf("%d: %s\n", vm->mode_num, vm->mode_descr); (void)printf(