Permalink
Browse files

Ansify some function definitions that were previously overlooked.

  • Loading branch information...
Sascha Wildner
Sascha Wildner committed Aug 4, 2012
1 parent b09f9ad commit 89a89091c12ec84cf9b8955493e873d019d439fa
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -206,8 +206,7 @@ static struct val2str str_alg_comp[] = {
* dump SADB_MSG formated. For debugging, you should use kdebug_sadb().
*/
void
-pfkey_sadump(m)
- struct sadb_msg *m;
+pfkey_sadump(struct sadb_msg *m)
{
caddr_t mhp[SADB_EXT_MAX + 1];
struct sadb_sa *m_sa;
@@ -365,8 +364,7 @@ pfkey_sadump(m)
}
void
-pfkey_spdump(m)
- struct sadb_msg *m;
+pfkey_spdump(struct sadb_msg *m)
{
char pbuf[NI_MAXSERV];
caddr_t mhp[SADB_EXT_MAX + 1];
@@ -484,8 +482,7 @@ pfkey_spdump(m)
* set "ipaddress" to buffer.
*/
static char *
-str_ipaddr(sa)
- struct sockaddr *sa;
+str_ipaddr(struct sockaddr *sa)
{
static char buf[NI_MAXHOST];
#ifdef NI_WITHSCOPEID
@@ -506,8 +503,7 @@ str_ipaddr(sa)
* set "/prefix[port number]" to buffer.
*/
static char *
-str_prefport(family, pref, port)
- u_int family, pref, port;
+str_prefport(u_int family, u_int pref, u_int port)
{
static char buf[128];
char prefbuf[128];
@@ -544,8 +540,7 @@ str_prefport(family, pref, port)
* set "Mon Day Time Year" to buffer
*/
static char *
-str_time(t)
- time_t t;
+str_time(time_t t)
{
static char buf[128];
@@ -564,9 +559,7 @@ str_time(t)
}
static void
-str_lifetime_byte(x, str)
- struct sadb_lifetime *x;
- char *str;
+str_lifetime_byte(struct sadb_lifetime *x, char *str)
{
double y;
char *unit;
View
@@ -96,7 +96,7 @@ getfiobyfd(struct puffs_usermount *pu, int fd)
}
struct puffs_framebuf *
-puffs_framebuf_make()
+puffs_framebuf_make(void)
{
struct puffs_framebuf *pufbuf;
View
@@ -32,7 +32,6 @@
*
* @(#)logwtmp.c 8.1 (Berkeley) 6/4/93
* $FreeBSD: src/libexec/ftpd/logwtmp.c,v 1.9.2.2 2002/08/08 12:24:54 yar Exp $
- * $DragonFly: src/libexec/ftpd/logwtmp.c,v 1.2 2003/06/17 04:27:07 dillon Exp $
*/
#include <sys/types.h>
@@ -59,9 +58,7 @@ static int fd = -1;
* after login, but before logout).
*/
void
-ftpd_logwtmp(line, name, addr)
- char *line, *name;
- struct sockaddr *addr;
+ftpd_logwtmp(char *line, char *name, struct sockaddr *addr)
{
struct utmp ut;
struct stat buf;
View
@@ -83,7 +83,7 @@ static u_int8_t *BpfPkt = NULL;
** If an error is encountered, the program terminates here.
*/
int
-BpfOpen()
+BpfOpen(void)
{
struct ifreq ifr;
char bpfdev[32];
@@ -212,8 +212,7 @@ BpfOpen()
** None.
*/
char *
-BpfGetIntfName(errmsg)
- char **errmsg;
+BpfGetIntfName(char **errmsg)
{
struct ifreq ibuf[8], *ifrp, *ifend, *mp;
struct ifconf ifc;
@@ -302,9 +301,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;
@@ -368,8 +365,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));
@@ -392,7 +388,7 @@ BpfWrite(rconn)
** None.
*/
void
-BpfClose()
+BpfClose(void)
{
struct ifreq ifr;
@@ -45,7 +45,6 @@
*
* @(#)parseconf.c 8.1 (Berkeley) 6/4/93
* $FreeBSD: src/libexec/rbootd/parseconf.c,v 1.9.2.1 2001/03/05 11:17:52 kris Exp $
- * $DragonFly: src/libexec/rbootd/parseconf.c,v 1.3 2008/04/20 13:44:24 swildner Exp $
*/
#include <sys/param.h>
@@ -79,7 +78,7 @@
** to create a linked list of default boot files.
*/
int
-ParseConfig()
+ParseConfig(void)
{
FILE *fp;
CLIENT *client;
@@ -244,8 +243,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;
@@ -308,7 +306,7 @@ ParseAddr(str)
** called to re-order it's list of boot file pointers.
*/
int
-GetBootFiles()
+GetBootFiles(void)
{
DIR *dfd;
struct stat statb;
View
@@ -46,7 +46,6 @@
* @(#) Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved.
* @(#)rbootd.c 8.1 (Berkeley) 6/4/93
* $FreeBSD: src/libexec/rbootd/rbootd.c,v 1.11.2.1 2001/02/18 02:54:11 kris Exp $
- * $DragonFly: src/libexec/rbootd/rbootd.c,v 1.4 2006/03/18 19:43:18 swildner Exp $
*/
#include <sys/param.h>
@@ -66,9 +65,7 @@
static void usage (void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int c, fd, omask, maxfds;
fd_set rset;
@@ -280,7 +277,7 @@ main(argc, argv)
}
static void
-usage()
+usage(void)
{
fprintf(stderr, "usage: rbootd [-ad] [-i interface] [config_file]\n");
exit (1);
@@ -299,7 +296,7 @@ usage()
** - Timed out connections in `RmpConns' will be freed.
*/
void
-DoTimeout()
+DoTimeout(void)
{
RMPCONN *rtmp;
struct timeval now;
@@ -336,8 +333,7 @@ DoTimeout()
*/
CLIENT *
-FindClient(rconn)
- RMPCONN *rconn;
+FindClient(RMPCONN *rconn)
{
CLIENT *ctmp;
@@ -362,8 +358,7 @@ FindClient(rconn)
** - This process ceases to exist.
*/
void
-Exit(sig)
- int sig;
+Exit(int sig)
{
if (sig > 0)
syslog(LOG_ERR, "going down on signal %d", sig);
@@ -391,8 +386,7 @@ Exit(sig)
** - This routine must be called with SIGHUP blocked.
*/
void
-ReConfig(signo)
- int signo;
+ReConfig(int signo)
{
syslog(LOG_NOTICE, "reconfiguring boot server");
@@ -418,8 +412,7 @@ ReConfig(signo)
** - Debug file is closed.
*/
void
-DebugOff(signo)
- int signo;
+DebugOff(int signo)
{
if (DbgFp != NULL)
(void) fclose(DbgFp);
@@ -441,8 +434,7 @@ DebugOff(signo)
** otherwise do nothing.
*/
void
-DebugOn(signo)
- int signo;
+DebugOn(int signo)
{
if (DbgFp == NULL) {
if ((DbgFp = fopen(DbgFile, "w")) == NULL)
View
@@ -81,9 +81,7 @@
** 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;
@@ -171,8 +169,7 @@ ProcessPacket(rconn, client)
** none.
*/
int
-SendServerID(rconn)
- RMPCONN *rconn;
+SendServerID(RMPCONN *rconn)
{
struct rmp_packet *rpl;
char *src, *dst;
@@ -223,10 +220,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;
@@ -286,10 +280,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];
@@ -398,8 +389,7 @@ SendBootRepl(req, rconn, filelist)
** none.
*/
int
-SendReadRepl(rconn)
- RMPCONN *rconn;
+SendReadRepl(RMPCONN *rconn)
{
int retval = 0;
RMPCONN *oldconn;
@@ -516,8 +506,7 @@ SendReadRepl(rconn)
** none.
*/
int
-BootDone(rconn)
- RMPCONN *rconn;
+BootDone(RMPCONN *rconn)
{
RMPCONN *oldconn;
struct rmp_packet *rpl;
@@ -564,8 +553,7 @@ BootDone(rconn)
** none.
*/
int
-SendPacket(rconn)
- RMPCONN *rconn;
+SendPacket(RMPCONN *rconn)
{
/*
* Set Ethernet Destination address to Source (BPF and the enet
Oops, something went wrong.

0 comments on commit 89a8909

Please sign in to comment.