Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jul 2021 14:00:59 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e0c0612d9ba4 - main - setkey: ansify
Message-ID:  <202107081400.168E0xrO088312@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=e0c0612d9ba4b56e51ebca483f1f82d70d64f0f8

commit e0c0612d9ba4b56e51ebca483f1f82d70d64f0f8
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-07-08 11:28:34 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2021-07-08 14:00:55 +0000

    setkey: ansify
---
 sbin/setkey/setkey.c | 28 ++++++++++------------------
 1 file changed, 10 insertions(+), 18 deletions(-)

diff --git a/sbin/setkey/setkey.c b/sbin/setkey/setkey.c
index 1d66a92e0100..d011fd44a40a 100644
--- a/sbin/setkey/setkey.c
+++ b/sbin/setkey/setkey.c
@@ -91,7 +91,7 @@ extern int lineno;
 extern int parse(FILE **);
 
 void
-usage()
+usage(void)
 {
 
 	printf("usage: setkey [-v] -c\n");
@@ -103,9 +103,7 @@ usage()
 }
 
 int
-main(ac, av)
-	int ac;
-	char **av;
+main(int ac, char **av)
 {
 	FILE *fp = stdin;
 	int c;
@@ -202,7 +200,7 @@ main(ac, av)
 }
 
 int
-get_supported()
+get_supported(void)
 {
 
 	if (pfkey_send_register(so, SADB_SATYPE_UNSPEC) < 0)
@@ -234,7 +232,7 @@ sendkeyshort(u_int type, uint8_t satype)
 }
 
 void
-promisc()
+promisc(void)
 {
 	struct sadb_msg msg;
 	u_char rbuf[1024 * 32];	/* XXX: Enough ? Should I do MSG_PEEK ? */
@@ -300,9 +298,7 @@ promisc()
 }
 
 int
-sendkeymsg(buf, len)
-	char *buf;
-	size_t len;
+sendkeymsg(char *buf, size_t len)
 {
 	u_char rbuf[1024 * 32];	/* XXX: Enough ? Should I do MSG_PEEK ? */
 	ssize_t l;
@@ -374,9 +370,7 @@ end:
 }
 
 int
-postproc(msg, len)
-	struct sadb_msg *msg;
-	int len;
+postproc(struct sadb_msg *msg, int len)
 {
 
 	if (msg->sadb_msg_errno != 0) {
@@ -482,8 +476,7 @@ static const char *ipproto[] = {
 	(((x) < sizeof(tab)/sizeof(tab[0]) && tab[(x)])	? tab[(x)] : numstr(x))
 
 const char *
-numstr(x)
-	int x;
+numstr(int x)
 {
 	static char buf[20];
 	snprintf(buf, sizeof(buf), "#%d", x);
@@ -491,15 +484,14 @@ numstr(x)
 }
 
 void
-shortdump_hdr()
+shortdump_hdr(void)
 {
 	printf("%-4s %-3s %-1s %-8s %-7s %s -> %s\n",
 		"time", "p", "s", "spi", "ltime", "src", "dst");
 }
 
 void
-shortdump(msg)
-	struct sadb_msg *msg;
+shortdump(struct sadb_msg *msg)
 {
 	caddr_t mhp[SADB_EXT_MAX + 1];
 	char buf[NI_MAXHOST], pbuf[NI_MAXSERV];
@@ -585,7 +577,7 @@ shortdump(msg)
  * Print the timestamp
  */
 static void
-printdate()
+printdate(void)
 {
 	struct timeval tp;
 	int s;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107081400.168E0xrO088312>