summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-07-03 23:39:03 +0000
committerderaadt <deraadt@openbsd.org>2002-07-03 23:39:03 +0000
commit5b48e80ab416cbf732103aa6d9aa4017b887a947 (patch)
tree4b4762dbd0cfae871ad3d6c7d2f9eb4078097580 /libexec
parentXr fixes; from PR 2794 (diff)
downloadwireguard-openbsd-5b48e80ab416cbf732103aa6d9aa4017b887a947.tar.xz
wireguard-openbsd-5b48e80ab416cbf732103aa6d9aa4017b887a947.zip
KNF
Diffstat (limited to 'libexec')
-rw-r--r--libexec/comsat/comsat.c26
-rw-r--r--libexec/fingerd/fingerd.c10
-rw-r--r--libexec/ftp-proxy/ftp-proxy.c20
-rw-r--r--libexec/getNAME/getNAME.c25
-rw-r--r--libexec/getty/main.c33
-rw-r--r--libexec/getty/subr.c33
-rw-r--r--libexec/lockspool/lockspool.c13
-rw-r--r--libexec/mail.local/locking.c13
-rw-r--r--libexec/mail.local/mail.local.c21
-rw-r--r--libexec/rpc.rquotad/rquotad.c4
-rw-r--r--libexec/tftpd/tftpd.c31
-rw-r--r--libexec/uucpd/uucpd.c27
12 files changed, 97 insertions, 159 deletions
diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c
index 0b047933405..558345935ec 100644
--- a/libexec/comsat/comsat.c
+++ b/libexec/comsat/comsat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: comsat.c,v 1.23 2002/06/20 18:26:49 deraadt Exp $ */
+/* $OpenBSD: comsat.c,v 1.24 2002/07/03 23:39:03 deraadt Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)comsat.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$OpenBSD: comsat.c,v 1.23 2002/06/20 18:26:49 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: comsat.c,v 1.24 2002/07/03 23:39:03 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -87,9 +87,7 @@ void reapchildren(int);
volatile sig_atomic_t wantreadutmp;
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct sockaddr_storage from;
struct sigaction sa;
@@ -158,8 +156,7 @@ main(argc, argv)
}
void
-reapchildren(signo)
- int signo;
+reapchildren(int signo)
{
int save_errno = errno;
@@ -169,8 +166,7 @@ reapchildren(signo)
}
void
-readutmp(signo)
- int signo;
+readutmp(int signo)
{
wantreadutmp = 1;
}
@@ -201,8 +197,7 @@ doreadutmp(void)
}
void
-mailfor(name)
- char *name;
+mailfor(char *name)
{
struct utmp *utp = &utmp[nutmp];
char utname[UT_NAMESIZE+1];
@@ -224,9 +219,7 @@ mailfor(name)
static char *cr;
void
-notify(utp, offset)
- struct utmp *utp;
- off_t offset;
+notify(struct utmp *utp, off_t offset)
{
FILE *tp;
struct stat stb;
@@ -268,10 +261,7 @@ notify(utp, offset)
}
void
-jkfprintf(tp, name, offset)
- FILE *tp;
- char name[];
- off_t offset;
+jkfprintf(FILE *tp, char name[], off_t offset)
{
char *cp, ch;
char visout[5], *s2;
diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c
index 291542bd77a..168bafb2384 100644
--- a/libexec/fingerd/fingerd.c
+++ b/libexec/fingerd/fingerd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fingerd.c,v 1.27 2002/06/02 01:27:15 deraadt Exp $ */
+/* $OpenBSD: fingerd.c,v 1.28 2002/07/03 23:39:03 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "from: @(#)fingerd.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: fingerd.c,v 1.27 2002/06/02 01:27:15 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: fingerd.c,v 1.28 2002/07/03 23:39:03 deraadt Exp $";
#endif
#endif /* not lint */
@@ -66,7 +66,7 @@ void err(const char *, ...);
void usage(void);
void
-usage()
+usage(void)
{
syslog(LOG_ERR,
"usage: fingerd [-slumMpS] [-P filename]");
@@ -75,9 +75,7 @@ usage()
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
FILE *fp;
int ch, ac = 2;
diff --git a/libexec/ftp-proxy/ftp-proxy.c b/libexec/ftp-proxy/ftp-proxy.c
index 2f336080405..99546182352 100644
--- a/libexec/ftp-proxy/ftp-proxy.c
+++ b/libexec/ftp-proxy/ftp-proxy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftp-proxy.c,v 1.22 2002/06/09 01:03:12 beck Exp $ */
+/* $OpenBSD: ftp-proxy.c,v 1.23 2002/07/03 23:39:03 deraadt Exp $ */
/*
* Copyright (c) 1996-2001
@@ -161,7 +161,7 @@ connection_mode_t connection_mode;
extern void debuglog(int debug_level, const char *fmt, ...);
static void
-usage()
+usage(void)
{
syslog(LOG_NOTICE,
"usage: %s [-AnrVw] [-t timeout] [-D debuglevel] %s %s",
@@ -171,7 +171,7 @@ usage()
}
static void
-close_client_data()
+close_client_data(void)
{
if (client_data_socket >= 0) {
shutdown(client_data_socket, 2);
@@ -181,7 +181,7 @@ close_client_data()
}
static void
-close_server_data()
+close_server_data(void)
{
if (server_data_socket >= 0) {
shutdown(server_data_socket, 2);
@@ -191,7 +191,7 @@ close_server_data()
}
static void
-drop_privs()
+drop_privs(void)
{
struct passwd *pw;
struct group *gr;
@@ -285,7 +285,7 @@ check_host(struct sockaddr_in *client_sin, struct sockaddr_in *server_sin)
}
double
-wallclock_time()
+wallclock_time(void)
{
struct timeval tv;
@@ -297,7 +297,7 @@ wallclock_time()
* Show the stats for this data transfer
*/
void
-show_xfer_stats()
+show_xfer_stats(void)
{
char tbuf[1000];
double delta;
@@ -452,7 +452,7 @@ new_dataconn(int server)
}
static void
-connect_pasv_backchannel()
+connect_pasv_backchannel(void)
{
struct sockaddr_in listen_sa;
int salen;
@@ -495,7 +495,7 @@ connect_pasv_backchannel()
}
static void
-connect_port_backchannel()
+connect_port_backchannel(void)
{
struct sockaddr_in listen_sa;
int salen;
@@ -951,7 +951,7 @@ do_server_reply(struct csiob *server, struct csiob *client)
}
int
-main(int argc, char **argv)
+main(int argc, char *argv[])
{
struct csiob client_iob, server_iob;
struct sigaction new_sa, old_sa;
diff --git a/libexec/getNAME/getNAME.c b/libexec/getNAME/getNAME.c
index 78efa11944c..e31293708e2 100644
--- a/libexec/getNAME/getNAME.c
+++ b/libexec/getNAME/getNAME.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getNAME.c,v 1.9 2002/05/22 06:35:43 deraadt Exp $ */
+/* $OpenBSD: getNAME.c,v 1.10 2002/07/03 23:39:03 deraadt Exp $ */
/* $NetBSD: getNAME.c,v 1.7.2.1 1997/11/10 19:54:46 thorpej Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)getNAME.c 8.1 (Berkeley) 6/30/93";
#else
-static char rcsid[] = "$OpenBSD: getNAME.c,v 1.9 2002/05/22 06:35:43 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: getNAME.c,v 1.10 2002/07/03 23:39:03 deraadt Exp $";
#endif
#endif /* not lint */
@@ -73,9 +73,7 @@ void usage(void);
int main(int, char *[]);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int ch;
@@ -106,8 +104,7 @@ main(argc, argv)
}
void
-getfrom(pathname)
- char *pathname;
+getfrom(char *pathname)
{
int i = 0;
char *name, *loc, *s, *t;
@@ -275,8 +272,7 @@ newman:
}
void
-trimln(cp)
- char *cp;
+trimln(char *cp)
{
while (*cp)
@@ -286,8 +282,7 @@ trimln(cp)
}
void
-doname(name)
- char *name;
+doname(char *name)
{
char *dp = name, *ep;
@@ -310,8 +305,7 @@ again:
}
void
-split(line, name)
- char *line, *name;
+split(char *line, char *name)
{
char *cp, *dp;
char *sp, *sep;
@@ -343,8 +337,7 @@ split(line, name)
}
void
-dorefname(name)
- char *name;
+dorefname(char *name)
{
char *dp = name, *ep;
@@ -365,7 +358,7 @@ again:
}
void
-usage()
+usage(void)
{
(void)fprintf(stderr, "usage: getNAME [-itw] file ...\n");
exit(1);
diff --git a/libexec/getty/main.c b/libexec/getty/main.c
index 405312788ee..67b4f039d7c 100644
--- a/libexec/getty/main.c
+++ b/libexec/getty/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.23 2002/05/22 06:35:43 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.24 2002/07/03 23:39:03 deraadt Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/
-static char rcsid[] = "$OpenBSD: main.c,v 1.23 2002/05/22 06:35:43 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.24 2002/07/03 23:39:03 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -128,7 +128,7 @@ char partab[] = {
#define EOT tmode.c_cc[VEOF]
static void
-dingdong()
+dingdong(int signo)
{
tmode.c_ispeed = tmode.c_ospeed = 0;
(void)tcsetattr(0, TCSANOW, &tmode);
@@ -138,7 +138,7 @@ dingdong()
volatile sig_atomic_t interrupt_flag;
static void
-interrupt()
+interrupt(int signo)
{
int save_errno = errno;
@@ -151,8 +151,7 @@ interrupt()
* Action to take when getty is running too long.
*/
void
-timeoverrun(signo)
- int signo;
+timeoverrun(int signo)
{
struct syslog_data sdata = SYSLOG_DATA_INIT;
@@ -170,9 +169,7 @@ static void putpad(char *);
static void xputs(char *);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
extern char **environ;
char *tname;
@@ -349,7 +346,7 @@ main(argc, argv)
}
static int
-getname()
+getname(void)
{
int ppp_state = 0, ppp_connection = 0;
unsigned char cs;
@@ -466,8 +463,7 @@ getname()
}
static void
-putpad(s)
- char *s;
+putpad(char *s)
{
int pad = 0;
speed_t ospeed = cfgetospeed(&tmode);
@@ -504,8 +500,7 @@ putpad(s)
}
static void
-xputs(s)
- char *s;
+xputs(char *s)
{
while (*s)
putchr(*s++);
@@ -515,8 +510,7 @@ char outbuf[OBUFSIZ];
int obufcnt = 0;
static void
-putchr(cc)
- int cc;
+putchr(int cc)
{
char c;
@@ -535,7 +529,7 @@ putchr(cc)
}
static void
-oflush()
+oflush(void)
{
if (obufcnt)
write(STDOUT_FILENO, outbuf, obufcnt);
@@ -543,7 +537,7 @@ oflush()
}
static void
-prompt()
+prompt(void)
{
putf(LM);
@@ -552,8 +546,7 @@ prompt()
}
static void
-putf(cp)
- char *cp;
+putf(char *cp)
{
extern char editedhost[];
char *slash, db[100];
diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c
index 1ac1b2f459f..e2e12de162f 100644
--- a/libexec/getty/subr.c
+++ b/libexec/getty/subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr.c,v 1.16 2002/05/27 06:36:40 deraadt Exp $ */
+/* $OpenBSD: subr.c,v 1.17 2002/07/03 23:39:03 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)subr.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$OpenBSD: subr.c,v 1.16 2002/05/27 06:36:40 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: subr.c,v 1.17 2002/07/03 23:39:03 deraadt Exp $";
#endif /* not lint */
/*
@@ -60,8 +60,7 @@ static void compatflags(long);
* Get a table entry.
*/
void
-gettable(name, buf)
- char *name, *buf;
+gettable(char *name, char *buf)
{
struct gettystrs *sp;
struct gettynums *np;
@@ -106,7 +105,7 @@ gettable(name, buf)
}
void
-gendefaults()
+gendefaults(void)
{
struct gettystrs *sp;
struct gettynums *np;
@@ -126,7 +125,7 @@ gendefaults()
}
void
-setdefaults()
+setdefaults(void)
{
struct gettystrs *sp;
struct gettynums *np;
@@ -159,7 +158,7 @@ charvars[] = {
};
void
-setchars()
+setchars(void)
{
int i;
char *p;
@@ -179,8 +178,7 @@ setchars()
#define ISSET(t, f) ((t) & (f))
void
-setflags(n)
- int n;
+setflags(int n)
{
tcflag_t iflag, oflag, cflag, lflag;
@@ -362,8 +360,7 @@ out:
* Old TTY => termios, snatched from <sys/kern/tty_compat.c>
*/
void
-compatflags(flags)
-long flags;
+compatflags(long flags)
{
tcflag_t iflag, oflag, cflag, lflag;
@@ -555,9 +552,7 @@ delaybits()
}
int
-adelay(ms, dp)
- ms;
- struct delayval *dp;
+adelay(int ms, struct delayval *dp)
{
if (ms == 0)
return (0);
@@ -570,8 +565,7 @@ adelay(ms, dp)
char editedhost[48];
void
-edithost(pat)
- char *pat;
+edithost(char *pat)
{
char *host = HN;
char *res = editedhost;
@@ -609,8 +603,7 @@ edithost(pat)
}
void
-makeenv(env)
- char *env[];
+makeenv(char *env[])
{
static char termbuf[128] = "TERM=";
char *p, *q;
@@ -658,7 +651,7 @@ struct portselect {
};
char *
-portselector()
+portselector(void)
{
char c, baud[20], *type = "default";
struct portselect *ps;
@@ -693,7 +686,7 @@ portselector()
#include <sys/time.h>
char *
-autobaud()
+autobaud(void)
{
fd_set rfds;
struct timeval timeout;
diff --git a/libexec/lockspool/lockspool.c b/libexec/lockspool/lockspool.c
index 7c18f4bc46a..8f392dea89c 100644
--- a/libexec/lockspool/lockspool.c
+++ b/libexec/lockspool/lockspool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lockspool.c,v 1.7 2002/02/16 21:27:30 millert Exp $ */
+/* $OpenBSD: lockspool.c,v 1.8 2002/07/03 23:39:03 deraadt Exp $ */
/*
* Copyright (c) 1998 Theo de Raadt <deraadt@theos.com>
@@ -29,7 +29,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: lockspool.c,v 1.7 2002/02/16 21:27:30 millert Exp $";
+static const char rcsid[] = "$OpenBSD: lockspool.c,v 1.8 2002/07/03 23:39:03 deraadt Exp $";
#endif /* not lint */
#include <sys/signal.h>
@@ -46,9 +46,7 @@ void usage(void);
extern char *__progname;
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char *argv[])
{
struct passwd *pw;
char *from, c;
@@ -97,8 +95,7 @@ main(argc, argv)
}
void
-unhold(sig)
- int sig;
+unhold(int signo)
{
rellock();
@@ -106,7 +103,7 @@ unhold(sig)
}
void
-usage()
+usage(void)
{
merr(FATAL, "usage: %s [username]", __progname);
diff --git a/libexec/mail.local/locking.c b/libexec/mail.local/locking.c
index 982b9b65577..b8cd3b3b6df 100644
--- a/libexec/mail.local/locking.c
+++ b/libexec/mail.local/locking.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: locking.c,v 1.5 2002/02/19 19:39:38 millert Exp $ */
+/* $OpenBSD: locking.c,v 1.6 2002/07/03 23:39:03 deraadt Exp $ */
/*
* Copyright (c) 1996-1998 Theo de Raadt <deraadt@theos.com>
@@ -29,7 +29,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: locking.c,v 1.5 2002/02/19 19:39:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: locking.c,v 1.6 2002/07/03 23:39:03 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -49,7 +49,7 @@ static char rcsid[] = "$OpenBSD: locking.c,v 1.5 2002/02/19 19:39:38 millert Exp
static char lpath[MAXPATHLEN];
void
-rellock()
+rellock(void)
{
if (lpath[0])
@@ -57,9 +57,7 @@ rellock()
}
int
-getlock(name, pw)
- char *name;
- struct passwd *pw;
+getlock(char *name, struct passwd *pw)
{
struct stat sb, fsb;
int lfd=-1;
@@ -143,8 +141,7 @@ again:
}
void
-baditem(path)
- char *path;
+baditem(char *path)
{
char npath[MAXPATHLEN];
diff --git a/libexec/mail.local/mail.local.c b/libexec/mail.local/mail.local.c
index 604410678de..da300c66f66 100644
--- a/libexec/mail.local/mail.local.c
+++ b/libexec/mail.local/mail.local.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mail.local.c,v 1.23 2002/06/02 01:27:16 deraadt Exp $ */
+/* $OpenBSD: mail.local.c,v 1.24 2002/07/03 23:39:03 deraadt Exp $ */
/*-
* Copyright (c) 1996-1998 Theo de Raadt <deraadt@theos.com>
@@ -45,7 +45,7 @@ char copyright[] =
#if 0
static char sccsid[] = "from: @(#)mail.local.c 5.6 (Berkeley) 6/19/91";
#else
-static char rcsid[] = "$OpenBSD: mail.local.c,v 1.23 2002/06/02 01:27:16 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: mail.local.c,v 1.24 2002/07/03 23:39:03 deraadt Exp $";
#endif
#endif /* not lint */
@@ -68,9 +68,7 @@ static char rcsid[] = "$OpenBSD: mail.local.c,v 1.23 2002/06/02 01:27:16 deraadt
#include "mail.local.h"
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char *argv[])
{
struct passwd *pw;
int ch, fd, eval, lockfile=1, holdme=0;
@@ -134,8 +132,7 @@ main(argc, argv)
}
int
-store(from)
- char *from;
+store(char *from)
{
FILE *fp = NULL;
time_t tval;
@@ -189,10 +186,7 @@ store(from)
}
int
-deliver(fd, name, lockfile)
- int fd;
- char *name;
- int lockfile;
+deliver(int fd, char *name, int lockfile)
{
struct stat sb, fsb;
struct passwd *pw;
@@ -310,8 +304,7 @@ bad:
}
void
-notifybiff(msg)
- char *msg;
+notifybiff(char *msg)
{
static struct sockaddr_in addr;
static int f = -1;
@@ -343,7 +336,7 @@ notifybiff(msg)
}
void
-usage()
+usage(void)
{
merr(FATAL, "usage: mail.local [-lL] [-f from] user ...");
}
diff --git a/libexec/rpc.rquotad/rquotad.c b/libexec/rpc.rquotad/rquotad.c
index 2f97f00d5dc..03f4e24eb64 100644
--- a/libexec/rpc.rquotad/rquotad.c
+++ b/libexec/rpc.rquotad/rquotad.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rquotad.c,v 1.14 2002/06/20 03:43:33 deraadt Exp $ */
+/* $OpenBSD: rquotad.c,v 1.15 2002/07/03 23:39:03 deraadt Exp $ */
/*
* by Manuel Bouyer (bouyer@ensta.fr). Public domain.
@@ -50,7 +50,7 @@ struct fs_stat *fs_begin = NULL;
int from_inetd = 1;
void
-cleanup()
+cleanup(void)
{
(void) pmap_unset(RQUOTAPROG, RQUOTAVERS); /* XXX signal races */
_exit(0);
diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c
index 3ca9c1820d9..1656169cae4 100644
--- a/libexec/tftpd/tftpd.c
+++ b/libexec/tftpd/tftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftpd.c,v 1.24 2002/06/04 10:08:51 mpech Exp $ */
+/* $OpenBSD: tftpd.c,v 1.25 2002/07/03 23:39:03 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)tftpd.c 5.13 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$OpenBSD: tftpd.c,v 1.24 2002/06/04 10:08:51 mpech Exp $";
+static char rcsid[] = "$OpenBSD: tftpd.c,v 1.25 2002/07/03 23:39:03 deraadt Exp $";
#endif /* not lint */
/*
@@ -120,16 +120,14 @@ int write_behind(FILE *file, int convert);
int synchnet(int f);
static void
-usage()
+usage(void)
{
syslog(LOG_ERR, "Usage: %s [-cs] [directory ...]", __progname);
exit(1);
}
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char *argv[])
{
struct tftphdr *tp;
struct passwd *pw;
@@ -285,9 +283,7 @@ main(argc, argv)
* Handle initial connection protocol.
*/
void
-tftp(tp, size)
- struct tftphdr *tp;
- int size;
+tftp(struct tftphdr *tp, int size)
{
char *cp;
int first = 1, ecode;
@@ -347,9 +343,7 @@ FILE *file;
* given as we have no login directory.
*/
int
-validate_access(filename, mode)
- char *filename;
- int mode;
+validate_access(char *filename, int mode)
{
struct stat stbuf;
int fd, wmode;
@@ -419,7 +413,7 @@ int timeout;
jmp_buf timeoutbuf;
void
-timer()
+timer(int signo)
{
/* XXX longjmp/signal resource leaks */
timeout += rexmtval;
@@ -432,8 +426,7 @@ timer()
* Send the requested file.
*/
int
-sendfile(pf)
- struct formats *pf;
+sendfile(struct formats *pf)
{
struct tftphdr *dp, *r_init();
struct tftphdr *ap; /* ack packet */
@@ -494,7 +487,7 @@ abort:
}
void
-justquit()
+justquit(int signo)
{
_exit(0);
}
@@ -504,8 +497,7 @@ justquit()
* Receive a file.
*/
int
-recvfile(pf)
- struct formats *pf;
+recvfile(struct formats *pf)
{
struct tftphdr *dp, *w_init();
struct tftphdr *ap; /* ack buffer */
@@ -600,8 +592,7 @@ struct errmsg {
* offset by 100.
*/
void
-nak(error)
- int error;
+nak(int error)
{
struct tftphdr *tp;
int length;
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c
index f4187effc7a..f1e77d8c747 100644
--- a/libexec/uucpd/uucpd.c
+++ b/libexec/uucpd/uucpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uucpd.c,v 1.23 2002/05/26 09:32:08 deraadt Exp $ */
+/* $OpenBSD: uucpd.c,v 1.24 2002/07/03 23:39:03 deraadt Exp $ */
/*
* Copyright (c) 1985 The Regents of the University of California.
@@ -44,7 +44,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)uucpd.c 5.10 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$OpenBSD: uucpd.c,v 1.23 2002/05/26 09:32:08 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: uucpd.c,v 1.24 2002/07/03 23:39:03 deraadt Exp $";
#endif /* not lint */
/*
@@ -95,9 +95,7 @@ extern char **environ;
char utline[UT_LINESIZE+1];
int
-main(argc, argv)
-int argc;
-char **argv;
+main(int argc, char *argv[])
{
#ifndef BSDINETD
int s, tcp_socket;
@@ -130,7 +128,7 @@ char **argv;
exit(0);
snprintf(utline, sizeof(utline), "uucp%.4ld", (long)childpid);
- if ((s=open(_PATH_TTY, 2)) >= 0){
+ if ((s = open(_PATH_TTY, 2)) >= 0){
ioctl(s, TIOCNOTTY, (char *)0);
close(s);
}
@@ -172,12 +170,11 @@ char **argv;
}
void
-doit(sinp)
-struct sockaddr_in *sinp;
+doit(struct sockaddr_in *sinp)
{
char user[64], passwd[64];
- char *xpasswd, *crypt();
- struct passwd *pw, *getpwnam();
+ char *xpasswd;
+ struct passwd *pw;
alarm(60);
do {
@@ -232,9 +229,7 @@ struct sockaddr_in *sinp;
}
int
-readline(p, n)
-char *p;
-int n;
+readline(char *p, int n)
{
char c;
@@ -257,7 +252,7 @@ int n;
struct utmp utmp;
void
-dologout()
+dologout(void)
{
int save_errno = errno;
int status, wtmp;
@@ -285,9 +280,7 @@ dologout()
* Record login in wtmp file.
*/
void
-dologin(pw, sin)
-struct passwd *pw;
-struct sockaddr_in *sin;
+dologin(struct passwd *pw, struct sockaddr_in *sin)
{
char line[32];
char remotehost[MAXHOSTNAMELEN];