From b4cc493422124d1d4e076c6c73a765bd5b4249d8 Mon Sep 17 00:00:00 2001 From: jca Date: Sun, 25 Oct 2015 22:11:34 +0000 Subject: [PATCH] ansify --- usr.sbin/rtadvd/advcap.c | 29 ++++++++++------------------- usr.sbin/rtadvd/config.c | 11 +++-------- usr.sbin/rtadvd/dump.c | 5 ++--- usr.sbin/rtadvd/if.c | 4 ++-- usr.sbin/rtadvd/rtadvd.c | 19 ++++++++----------- usr.sbin/rtadvd/timer.c | 4 ++-- 6 files changed, 27 insertions(+), 45 deletions(-) diff --git a/usr.sbin/rtadvd/advcap.c b/usr.sbin/rtadvd/advcap.c index 7f7230e7c36..025580627a2 100644 --- a/usr.sbin/rtadvd/advcap.c +++ b/usr.sbin/rtadvd/advcap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: advcap.c,v 1.15 2015/01/19 18:20:47 deraadt Exp $ */ +/* $OpenBSD: advcap.c,v 1.16 2015/10/25 22:11:34 jca Exp $ */ /* $KAME: advcap.c,v 1.9 2002/05/29 14:28:35 itojun Exp $ */ /* @@ -99,8 +99,7 @@ static char *tdecode(char *, char **); * we just notice escaped newlines. */ int -tgetent(bp, name) - char *bp, *name; +tgetent(char *bp, char *name) { char *cp; @@ -109,8 +108,7 @@ tgetent(bp, name) } int -getent(bp, name, cp) - char *bp, *name, *cp; +getent(char *bp, char *name, char *cp) { int c; int i = 0, cnt = 0; @@ -178,7 +176,7 @@ getent(bp, name, cp) * Note that this works because of the left to right scan. */ int -tnchktc() +tnchktc(void) { char *p, *q; char tcname[16]; /* name of similar terminal */ @@ -229,8 +227,7 @@ tnchktc() * name (before the first field) stops us. */ int -tnamatch(np) - char *np; +tnamatch(char *np) { char *Np, *Bp; @@ -256,8 +253,7 @@ tnamatch(np) * into the termcap file in octal. */ static char * -tskip(bp) - char *bp; +tskip(char *bp) { int dquote; @@ -301,8 +297,7 @@ breakbreak: * Note that we handle octal numbers beginning with 0. */ int64_t -tgetnum(id) - char *id; +tgetnum(char *id) { int64_t i; int base; @@ -337,8 +332,7 @@ tgetnum(id) * not given. */ int -tgetflag(id) - char *id; +tgetflag(char *id) { char *bp = tbuf; @@ -365,8 +359,7 @@ tgetflag(id) * No checking on area overflow. */ char * -tgetstr(id, area) - char *id, **area; +tgetstr(char *id, char **area) { char *bp = tbuf; @@ -391,9 +384,7 @@ tgetstr(id, area) * string capability escapes. */ static char * -tdecode(str, area) - char *str; - char **area; +tdecode(char *str, char **area) { char *cp; int c; diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index 554f1af31a1..ee3996ad1f8 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.43 2015/01/16 06:40:20 deraadt Exp $ */ +/* $OpenBSD: config.c,v 1.44 2015/10/25 22:11:34 jca Exp $ */ /* $KAME: config.c,v 1.62 2002/05/29 10:13:10 itojun Exp $ */ /* @@ -69,8 +69,7 @@ static int getinet6sysctl(int); extern struct ralist ralist; void -getconfig(intface) - char *intface; +getconfig(char *intface) { int stat, i; char tbuf[BUFSIZ]; @@ -606,11 +605,7 @@ get_prefix(struct rainfo *rai) } static void -makeentry(buf, len, id, string) - char *buf; - size_t len; - int id; - char *string; +makeentry(char *buf, size_t len, int id, char *string) { if (id < 0) diff --git a/usr.sbin/rtadvd/dump.c b/usr.sbin/rtadvd/dump.c index aa8856d89e3..16d860e3b7f 100644 --- a/usr.sbin/rtadvd/dump.c +++ b/usr.sbin/rtadvd/dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dump.c,v 1.15 2015/06/03 02:24:36 millert Exp $ */ +/* $OpenBSD: dump.c,v 1.16 2015/10/25 22:11:34 jca Exp $ */ /* $KAME: dump.c,v 1.27 2002/05/29 14:23:55 itojun Exp $ */ /* @@ -71,8 +71,7 @@ static char *rtpref_str[] = { }; static char * -ether_str(sdl) - struct sockaddr_dl *sdl; +ether_str(struct sockaddr_dl *sdl) { static char hbuf[NI_MAXHOST]; u_char *cp; diff --git a/usr.sbin/rtadvd/if.c b/usr.sbin/rtadvd/if.c index ff5358f8858..74831727d34 100644 --- a/usr.sbin/rtadvd/if.c +++ b/usr.sbin/rtadvd/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.28 2015/08/20 22:39:29 deraadt Exp $ */ +/* $OpenBSD: if.c,v 1.29 2015/10/25 22:11:34 jca Exp $ */ /* $KAME: if.c,v 1.17 2001/01/21 15:27:30 itojun Exp $ */ /* @@ -513,7 +513,7 @@ parse_iflist(struct if_msghdr ***ifmlist_p, char *buf, size_t bufsize) } void -init_iflist() +init_iflist(void) { if (ifblock) { free(ifblock); diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c index a24f7881262..005fbf246dd 100644 --- a/usr.sbin/rtadvd/rtadvd.c +++ b/usr.sbin/rtadvd/rtadvd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtadvd.c,v 1.57 2015/10/25 21:31:58 jca Exp $ */ +/* $OpenBSD: rtadvd.c,v 1.58 2015/10/25 22:11:34 jca Exp $ */ /* $KAME: rtadvd.c,v 1.66 2002/05/29 14:18:36 itojun Exp $ */ /* @@ -154,9 +154,7 @@ static void rtmsg_input(void); static void rtadvd_set_dump(int); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct pollfd pfd[2]; struct timeval *timeout; @@ -305,7 +303,7 @@ set_die(int signo) } static void -die() +die(void) { struct rainfo *ra; int i; @@ -328,7 +326,7 @@ die() } static void -rtmsg_input() +rtmsg_input(void) { int n, type, ifindex = 0, plen; size_t len; @@ -503,7 +501,7 @@ rtmsg_input() } void -rtadvd_input() +rtadvd_input(void) { int i; int *hlimp = NULL; @@ -1184,7 +1182,7 @@ free_ndopts(union nd_opts *ndopts) } void -sock_open() +sock_open(void) { struct rainfo *ra; struct icmp6_filter filt; @@ -1293,7 +1291,7 @@ sock_open() /* open a routing socket to watch the routing table */ static void -rtsock_open() +rtsock_open(void) { if ((rtsock = socket(PF_ROUTE, SOCK_RAW, 0)) < 0) fatal("socket"); @@ -1313,8 +1311,7 @@ if_indextorainfo(int index) } static void -ra_output(rainfo) -struct rainfo *rainfo; +ra_output(struct rainfo *rainfo) { int i; struct cmsghdr *cm; diff --git a/usr.sbin/rtadvd/timer.c b/usr.sbin/rtadvd/timer.c index 6394e80ce3b..5978ad47b5d 100644 --- a/usr.sbin/rtadvd/timer.c +++ b/usr.sbin/rtadvd/timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: timer.c,v 1.13 2014/11/02 02:45:46 deraadt Exp $ */ +/* $OpenBSD: timer.c,v 1.14 2015/10/25 22:11:34 jca Exp $ */ /* $KAME: timer.c,v 1.7 2002/05/21 14:26:55 itojun Exp $ */ /* @@ -91,7 +91,7 @@ rtadvd_set_timer(struct timeval *tm, struct rtadvd_timer *timer) * Return the next interval. */ struct timeval * -rtadvd_check_timer() +rtadvd_check_timer(void) { static struct timeval returnval; struct timeval now; -- 2.20.1