summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/ftpd.c138
-rw-r--r--libexec/ftpd/logutmp.c8
-rw-r--r--libexec/ftpd/logwtmp.c7
-rw-r--r--libexec/ftpd/popen.c10
-rw-r--r--libexec/lfs_cleanerd/cleanerd.c46
-rw-r--r--libexec/lfs_cleanerd/library.c89
-rw-r--r--libexec/lfs_cleanerd/misc.c10
-rw-r--r--libexec/lfs_cleanerd/print.c16
-rw-r--r--libexec/spamd-setup/spamd-setup.c8
-rw-r--r--libexec/spamd/spamd.c6
-rw-r--r--libexec/talkd/announce.c13
-rw-r--r--libexec/talkd/print.c12
-rw-r--r--libexec/talkd/process.c16
-rw-r--r--libexec/talkd/table.c22
-rw-r--r--libexec/talkd/talkd.c10
15 files changed, 127 insertions, 284 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 2b9405e84eb..15907e95583 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpd.c,v 1.142 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: ftpd.c,v 1.143 2003/06/11 14:24:46 deraadt Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
@@ -70,7 +70,7 @@ static const char copyright[] =
static const char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94";
#else
static const char rcsid[] =
- "$OpenBSD: ftpd.c,v 1.142 2003/06/02 19:38:24 millert Exp $";
+ "$OpenBSD: ftpd.c,v 1.143 2003/06/11 14:24:46 deraadt Exp $";
#endif
#endif /* not lint */
@@ -254,7 +254,7 @@ static void usage(void);
void logxfer(char *, off_t, time_t);
static char *
-curdir()
+curdir(void)
{
static char path[MAXPATHLEN+1]; /* path + '/' */
@@ -269,7 +269,7 @@ curdir()
char *argstr = "AdDhnlMSt:T:u:UvP46";
static void
-usage()
+usage(void)
{
syslog(LOG_ERR,
"usage: ftpd [-AdDhlMPSU46] [-t timeout] [-T maxtimeout] [-u mask]");
@@ -277,10 +277,7 @@ usage()
}
int
-main(argc, argv, envp)
- int argc;
- char *argv[];
- char **envp;
+main(int argc, char *argv[])
{
socklen_t addrlen;
int ch, on = 1, tos;
@@ -622,8 +619,7 @@ main(argc, argv, envp)
*/
static void
-lostconn(signo)
- int signo;
+lostconn(int signo)
{
struct syslog_data sdata = SYSLOG_DATA_INIT;
@@ -633,8 +629,7 @@ lostconn(signo)
}
static void
-sigquit(signo)
- int signo;
+sigquit(int signo)
{
struct syslog_data sdata = SYSLOG_DATA_INIT;
@@ -648,9 +643,7 @@ sigquit(signo)
* (e.g., globbing).
*/
static struct passwd *
-sgetpwnam(name, pw)
- char *name;
- struct passwd *pw;
+sgetpwnam(char *name, struct passwd *pw)
{
static struct passwd *save;
struct passwd *old;
@@ -687,8 +680,7 @@ static char curname[MAXLOGNAME]; /* current USER name */
* _PATH_FTPUSERS to allow people such as root and uucp to be avoided.
*/
void
-user(name)
- char *name;
+user(char *name)
{
char *cp, *shell, *style, *host;
char *class = NULL;
@@ -819,9 +811,7 @@ user(name)
* Check if a user is in the file "fname"
*/
static int
-checkuser(fname, name)
- char *fname;
- char *name;
+checkuser(char *fname, char *name)
{
FILE *fp;
int found = 0;
@@ -848,7 +838,7 @@ checkuser(fname, name)
* used when USER command is given or login fails.
*/
static void
-end_login()
+end_login(void)
{
sigprocmask (SIG_BLOCK, &allsigs, NULL);
@@ -862,8 +852,7 @@ end_login()
}
void
-pass(passwd)
- char *passwd;
+pass(char *passwd)
{
int authok, flags;
FILE *fp;
@@ -1109,8 +1098,7 @@ bad:
}
void
-retrieve(cmd, name)
- char *cmd, *name;
+retrieve(char *cmd, char *name)
{
FILE *fin, *dout;
struct stat st;
@@ -1183,9 +1171,7 @@ done:
}
void
-store(name, mode, unique)
- char *name, *mode;
- int unique;
+store(char *name, char *mode, int unique)
{
FILE *fout, *din;
int (*closefunc)(FILE *);
@@ -1263,8 +1249,7 @@ done:
}
static FILE *
-getdatasock(mode)
- char *mode;
+getdatasock(char *mode)
{
int on = 1, s, t, tries;
@@ -1330,10 +1315,7 @@ bad:
}
static FILE *
-dataconn(name, size, mode)
- char *name;
- off_t size;
- char *mode;
+dataconn(char *name, off_t size, char *mode)
{
char sizebuf[32];
FILE *file;
@@ -1486,11 +1468,7 @@ dataconn(name, size, mode)
* NB: Form isn't handled.
*/
static int
-send_data(instr, outstr, blksize, filesize, isreg)
- FILE *instr, *outstr;
- off_t blksize;
- off_t filesize;
- int isreg;
+send_data(FILE *instr, FILE *outstr, off_t blksize, off_t filesize, int isreg)
{
int c, cnt, filefd, netfd;
char *buf, *bp;
@@ -1607,8 +1585,7 @@ got_oob:
* N.B.: Form isn't handled.
*/
static int
-receive_data(instr, outstr)
- FILE *instr, *outstr;
+receive_data(FILE *instr, FILE *outstr)
{
int c;
int cnt;
@@ -1706,8 +1683,7 @@ got_oob:
}
void
-statfilecmd(filename)
- char *filename;
+statfilecmd(char *filename)
{
FILE *fin;
int c;
@@ -1743,7 +1719,7 @@ statfilecmd(filename)
}
void
-statcmd()
+statcmd(void)
{
union sockunion *su;
u_char *a, *p;
@@ -1875,8 +1851,7 @@ printaddr:
}
void
-fatal(s)
- char *s;
+fatal(char *s)
{
reply(451, "Error in server: %s", s);
@@ -1931,16 +1906,14 @@ lreply(int n, const char *fmt, ...)
}
static void
-ack(s)
- char *s;
+ack(char *s)
{
reply(250, "%s command successful.", s);
}
void
-nack(s)
- char *s;
+nack(char *s)
{
reply(502, "%s command not implemented.", s);
@@ -1948,8 +1921,7 @@ nack(s)
/* ARGSUSED */
void
-yyerror(s)
- char *s;
+yyerror(char *s)
{
char *cp;
@@ -1959,8 +1931,7 @@ yyerror(s)
}
void
-delete(name)
- char *name;
+delete(char *name)
{
struct stat st;
@@ -1985,8 +1956,7 @@ done:
}
void
-cwd(path)
- char *path;
+cwd(char *path)
{
FILE *message;
@@ -2009,8 +1979,7 @@ cwd(path)
}
void
-replydirname(name, message)
- const char *name, *message;
+replydirname(const char *name, const char *message)
{
char *p, *ep;
char npath[MAXPATHLEN * 2];
@@ -2034,8 +2003,7 @@ replydirname(name, message)
}
void
-makedir(name)
- char *name;
+makedir(char *name)
{
LOGCMD("mkdir", name);
@@ -2046,8 +2014,7 @@ makedir(name)
}
void
-removedir(name)
- char *name;
+removedir(char *name)
{
LOGCMD("rmdir", name);
@@ -2058,7 +2025,7 @@ removedir(name)
}
void
-pwd()
+pwd(void)
{
char path[MAXPATHLEN];
@@ -2069,8 +2036,7 @@ pwd()
}
char *
-renamefrom(name)
- char *name;
+renamefrom(char *name)
{
struct stat st;
@@ -2083,8 +2049,7 @@ renamefrom(name)
}
void
-renamecmd(from, to)
- char *from, *to;
+renamecmd(char *from, char *to)
{
LOGCMD2("rename", from, to);
@@ -2095,8 +2060,7 @@ renamecmd(from, to)
}
static void
-dolog(sa)
- struct sockaddr *sa;
+dolog(struct sockaddr *sa)
{
char hbuf[sizeof(remotehost)];
@@ -2118,8 +2082,7 @@ dolog(sa)
* use stdio (or call other functions that use stdio).
*/
void
-dologout(status)
- int status;
+dologout(int status)
{
transflag = 0;
@@ -2135,15 +2098,14 @@ dologout(status)
}
static void
-sigurg(signo)
- int signo;
+sigurg(int signo)
{
recvurg = 1;
}
static void
-myoob()
+myoob(void)
{
char *cp;
@@ -2178,7 +2140,7 @@ myoob()
* with Rick Adams on 25 Jan 89.
*/
void
-passive()
+passive(void)
{
socklen_t len;
int on;
@@ -2529,9 +2491,7 @@ epsv_protounsupp(const char *message)
* Generates failure reply on error.
*/
static int
-guniquefd(local, nam)
- char *local;
- char **nam;
+guniquefd(char *local, char **nam)
{
static char new[MAXPATHLEN];
struct stat st;
@@ -2569,9 +2529,7 @@ guniquefd(local, nam)
* Format and send reply containing system error number.
*/
void
-perror_reply(code, string)
- int code;
- char *string;
+perror_reply(int code, char *string)
{
reply(code, "%s: %s.", string, strerror(errno));
@@ -2583,8 +2541,7 @@ static char *onefile[] = {
};
void
-send_file_list(whichf)
- char *whichf;
+send_file_list(char *whichf)
{
struct stat st;
DIR *dirp = NULL;
@@ -2722,8 +2679,7 @@ out:
}
static void
-reapchild(signo)
- int signo;
+reapchild(int signo)
{
int save_errno = errno;
int rval;
@@ -2735,10 +2691,7 @@ reapchild(signo)
}
void
-logxfer(name, size, start)
- char *name;
- off_t size;
- time_t start;
+logxfer(char *name, off_t size, time_t start)
{
char buf[400 + MAXHOSTNAMELEN*4 + MAXPATHLEN*4];
char dir[MAXPATHLEN], path[MAXPATHLEN], rpath[MAXPATHLEN];
@@ -2782,8 +2735,7 @@ logxfer(name, size, start)
#if defined(TCPWRAPPERS)
static int
-check_host(sa)
- struct sockaddr *sa;
+check_host(struct sockaddr *sa)
{
struct sockaddr_in *sin;
struct hostent *hp;
@@ -2817,9 +2769,7 @@ check_host(sa)
* If 'dir' begins with a tilde (~), expand it.
*/
char *
-copy_dir(dir, pw)
- char *dir;
- struct passwd *pw;
+copy_dir(char *dir, struct passwd *pw)
{
char *cp;
char *newdir;
diff --git a/libexec/ftpd/logutmp.c b/libexec/ftpd/logutmp.c
index f83ba589b9c..77ec2c2dcb6 100644
--- a/libexec/ftpd/logutmp.c
+++ b/libexec/ftpd/logutmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: logutmp.c,v 1.5 2003/06/04 16:08:08 deraadt Exp $ */
+/* $OpenBSD: logutmp.c,v 1.6 2003/06/11 14:24:46 deraadt Exp $ */
/*
* Portions Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -50,8 +50,7 @@ static int topslot = -1;
*/
void
-login(ut)
- UTMP *ut;
+login(UTMP *ut)
{
UTMP ubuf;
@@ -90,8 +89,7 @@ login(ut)
}
int
-logout(line)
- char *line;
+logout(char *line)
{
UTMP ut;
int rval;
diff --git a/libexec/ftpd/logwtmp.c b/libexec/ftpd/logwtmp.c
index d385f26abbc..8fa97fd35d6 100644
--- a/libexec/ftpd/logwtmp.c
+++ b/libexec/ftpd/logwtmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: logwtmp.c,v 1.6 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: logwtmp.c,v 1.7 2003/06/11 14:24:46 deraadt Exp $ */
/* $NetBSD: logwtmp.c,v 1.4 1995/04/11 02:44:58 cgd Exp $ */
/*
@@ -36,7 +36,7 @@
static const char sccsid[] = "@(#)logwtmp.c 8.1 (Berkeley) 6/4/93";
#else
static const char rcsid[] =
- "$OpenBSD: logwtmp.c,v 1.6 2003/06/02 19:38:24 millert Exp $";
+ "$OpenBSD: logwtmp.c,v 1.7 2003/06/11 14:24:46 deraadt Exp $";
#endif
#endif /* not lint */
@@ -61,8 +61,7 @@ static int fd = -1;
* after login, but before logout).
*/
void
-ftpdlogwtmp(line, name, host)
- char *line, *name, *host;
+ftpdlogwtmp(char *line, char *name, char *host)
{
struct utmp ut;
struct stat buf;
diff --git a/libexec/ftpd/popen.c b/libexec/ftpd/popen.c
index a83d7081698..38ab9b8a816 100644
--- a/libexec/ftpd/popen.c
+++ b/libexec/ftpd/popen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: popen.c,v 1.18 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: popen.c,v 1.19 2003/06/11 14:24:46 deraadt Exp $ */
/* $NetBSD: popen.c,v 1.5 1995/04/11 02:45:00 cgd Exp $ */
/*
@@ -39,7 +39,7 @@
static const char sccsid[] = "@(#)popen.c 8.3 (Berkeley) 4/6/94";
#else
static const char rcsid[] =
- "$OpenBSD: popen.c,v 1.18 2003/06/02 19:38:24 millert Exp $";
+ "$OpenBSD: popen.c,v 1.19 2003/06/11 14:24:46 deraadt Exp $";
#endif
#endif /* not lint */
@@ -70,8 +70,7 @@ static int fds;
#define MAX_GARGV 1000
FILE *
-ftpd_popen(program, type)
- char *program, *type;
+ftpd_popen(char *program, char *type)
{
char *cp;
FILE *iop;
@@ -177,8 +176,7 @@ pfree: for (argc = 1; gargv[argc] != NULL; argc++)
}
int
-ftpd_pclose(iop)
- FILE *iop;
+ftpd_pclose(FILE *iop)
{
int fdes, status;
pid_t pid;
diff --git a/libexec/lfs_cleanerd/cleanerd.c b/libexec/lfs_cleanerd/cleanerd.c
index 73e53c15fcc..434d282f41f 100644
--- a/libexec/lfs_cleanerd/cleanerd.c
+++ b/libexec/lfs_cleanerd/cleanerd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cleanerd.c,v 1.11 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: cleanerd.c,v 1.12 2003/06/11 14:24:46 deraadt Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)cleanerd.c 8.5 (Berkeley) 6/10/95";*/
-static char rcsid[] = "$OpenBSD: cleanerd.c,v 1.11 2003/06/02 19:38:24 millert Exp $";
+static char rcsid[] = "$OpenBSD: cleanerd.c,v 1.12 2003/06/11 14:24:46 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -111,9 +111,7 @@ void sig_report(int);
*/
int
-cost_benefit(fsp, su)
- FS_INFO *fsp; /* file system information */
- SEGUSE *su;
+cost_benefit(FS_INFO *fsp, SEGUSE *su)
{
struct lfs *lfsp;
struct timeval t;
@@ -149,9 +147,7 @@ cost_benefit(fsp, su)
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
FS_INFO *fsp;
struct statfs *lstatfsp; /* file system stats */
@@ -241,10 +237,7 @@ main(argc, argv)
/* return the number of segments cleaned */
int
-clean_loop(fsp, nsegs, options)
- FS_INFO *fsp; /* file system information */
- int nsegs;
- long options;
+clean_loop(FS_INFO *fsp, int nsegs, long options)
{
double loadavg[MAXLOADS];
time_t now;
@@ -302,11 +295,8 @@ clean_loop(fsp, nsegs, options)
void
-clean_fs(fsp, cost_func, nsegs, options)
- FS_INFO *fsp; /* file system information */
- int (*cost_func)(FS_INFO *, SEGUSE *);
- int nsegs;
- long options;
+clean_fs(FS_INFO *fsp, int (*cost_func)(FS_INFO *, SEGUSE *),
+ int nsegs, long options)
{
struct seglist *segs, *sp;
int to_clean, cleaned_bytes;
@@ -359,9 +349,7 @@ clean_fs(fsp, cost_func, nsegs, options)
* cost/benefit than any utilized segment.
*/
int
-cost_compare(a, b)
- const void *a;
- const void *b;
+cost_compare(const void *a, const void *b)
{
return (((struct seglist *)b)->sl_cost -
((struct seglist *)a)->sl_cost);
@@ -373,10 +361,8 @@ cost_compare(a, b)
* filled in.
*/
int
-choose_segments(fsp, seglist, cost_func)
- FS_INFO *fsp;
- struct seglist *seglist;
- int (*cost_func)(FS_INFO *, SEGUSE *);
+choose_segments(FS_INFO *fsp, struct seglist *seglist,
+ int (*cost_func)(FS_INFO *, SEGUSE *))
{
struct lfs *lfsp;
struct seglist *sp;
@@ -415,9 +401,7 @@ choose_segments(fsp, seglist, cost_func)
int
-clean_segment(fsp, id)
- FS_INFO *fsp; /* file system information */
- int id; /* segment number */
+clean_segment(FS_INFO *fsp, int id)
{
BLOCK_INFO *block_array, *bp;
SEGUSE *sp;
@@ -524,10 +508,7 @@ clean_segment(fsp, id)
int
-bi_tossold(client, a, b)
- const void *client;
- const void *a;
- const void *b;
+bi_tossold(const void *client, const void *a, const void *b)
{
const struct tossstruct *t;
@@ -538,8 +519,7 @@ bi_tossold(client, a, b)
}
void
-sig_report(sig)
- int sig;
+sig_report(int sig)
{
double avg;
int save_errno = errno;
diff --git a/libexec/lfs_cleanerd/library.c b/libexec/lfs_cleanerd/library.c
index c295b546367..b37dc67a292 100644
--- a/libexec/lfs_cleanerd/library.c
+++ b/libexec/lfs_cleanerd/library.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library.c,v 1.10 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: library.c,v 1.11 2003/06/11 14:24:46 deraadt Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "@(#)library.c 8.3 (Berkeley) 5/24/95";*/
-static char rcsid[] = "$OpenBSD: library.c,v 1.10 2003/06/02 19:38:24 millert Exp $";
+static char rcsid[] = "$OpenBSD: library.c,v 1.11 2003/06/11 14:24:46 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -68,10 +68,7 @@ int pseg_valid(FS_INFO *, SEGSUM *);
* a non-zero value is returned.
*/
int
-fs_getmntinfo(buf, name, type)
- struct statfs **buf;
- char *name;
- const char *type;
+fs_getmntinfo(struct statfs **buf, char *name, const char *type)
{
/* allocate space for the filesystem info */
*buf = (struct statfs *)malloc(sizeof(struct statfs));
@@ -100,9 +97,7 @@ fs_getmntinfo(buf, name, type)
* Returns an pointer to an FS_INFO structure, NULL on error.
*/
FS_INFO *
-get_fs_info (lstatfsp, use_mmap)
- struct statfs *lstatfsp; /* IN: pointer to statfs struct */
- int use_mmap; /* IN: mmap or read */
+get_fs_info(struct statfs *lstatfsp, int use_mmap)
{
FS_INFO *fsp;
@@ -126,9 +121,7 @@ get_fs_info (lstatfsp, use_mmap)
* refresh the file system information (statfs) info.
*/
void
-reread_fs_info(fsp, use_mmap)
- FS_INFO *fsp; /* IN: prointer fs_infos to reread */
- int use_mmap;
+reread_fs_info(FS_INFO *fsp, int use_mmap)
{
if (statfs(fsp->fi_statfsp->f_mntonname, fsp->fi_statfsp))
err(1, "reread_fs_info: statfs failed");
@@ -139,9 +132,7 @@ reread_fs_info(fsp, use_mmap)
* Gets the superblock from disk (possibly in face of errors)
*/
int
-get_superblock (fsp, sbp)
- FS_INFO *fsp; /* local file system info structure */
- struct lfs *sbp;
+get_superblock(FS_INFO *fsp, struct lfs *sbp)
{
char mntfromname[MNAMELEN+1];
int fid;
@@ -165,10 +156,7 @@ get_superblock (fsp, sbp)
* fatal error on failure.
*/
void
-get_ifile (fsp, use_mmap)
- FS_INFO *fsp;
- int use_mmap;
-
+get_ifile(FS_INFO *fsp, int use_mmap)
{
struct stat file_stat;
caddr_t ifp;
@@ -247,12 +235,8 @@ redo_read:
* pair will be listed at most once.
*/
int
-lfs_segmapv(fsp, seg, seg_buf, blocks, bcount)
- FS_INFO *fsp; /* pointer to local file system information */
- int seg; /* the segment number */
- caddr_t seg_buf; /* the buffer containing the segment's data */
- BLOCK_INFO **blocks; /* OUT: array of block_info for live blocks */
- int *bcount; /* OUT: number of active blocks in segment */
+lfs_segmapv(FS_INFO *fsp, int seg, caddr_t seg_buf, BLOCK_INFO **blocks,
+ int *bcount)
{
BLOCK_INFO *bip;
SEGSUM *sp;
@@ -354,14 +338,8 @@ err0: *bcount = 0;
* blocks or inodes from files with new version numbers.
*/
void
-add_blocks (fsp, bip, countp, sp, seg_buf, segaddr, psegaddr)
- FS_INFO *fsp; /* pointer to super block */
- BLOCK_INFO *bip; /* Block info array */
- int *countp; /* IN/OUT: number of blocks in array */
- SEGSUM *sp; /* segment summary pointer */
- caddr_t seg_buf; /* buffer containing segment */
- daddr_t segaddr; /* address of this segment */
- daddr_t psegaddr; /* address of this partial segment */
+add_blocks(FS_INFO *fsp, BLOCK_INFO *bip, int *countp, SEGSUM *sp,
+ caddr_t seg_buf, daddr_t segaddr, daddr_t psegaddr)
{
IFILE *ifp;
FINFO *fip;
@@ -431,13 +409,8 @@ add_blocks (fsp, bip, countp, sp, seg_buf, segaddr, psegaddr)
* actually added.
*/
void
-add_inodes (fsp, bip, countp, sp, seg_buf, seg_addr)
- FS_INFO *fsp; /* pointer to super block */
- BLOCK_INFO *bip; /* block info array */
- int *countp; /* pointer to current number of inodes */
- SEGSUM *sp; /* segsum pointer */
- caddr_t seg_buf; /* the buffer containing the segment's data */
- daddr_t seg_addr; /* disk address of seg_buf */
+add_inodes(FS_INFO *fsp, BLOCK_INFO *bip, int *countp, SEGSUM *sp,
+ caddr_t seg_buf, daddr_t seg_addr)
{
struct dinode *di;
struct lfs *lfsp;
@@ -495,9 +468,7 @@ add_inodes (fsp, bip, countp, sp, seg_buf, seg_addr)
* the partial as well as whether or not the checksum is valid.
*/
int
-pseg_valid (fsp, ssp)
- FS_INFO *fsp; /* pointer to file system info */
- SEGSUM *ssp; /* pointer to segment summary block */
+pseg_valid(FS_INFO *fsp, SEGSUM *ssp)
{
caddr_t p;
int i, nblocks;
@@ -529,11 +500,7 @@ pseg_valid (fsp, ssp)
* read a segment into a memory buffer
*/
int
-mmap_segment (fsp, segment, segbuf, use_mmap)
- FS_INFO *fsp; /* file system information */
- int segment; /* segment number */
- caddr_t *segbuf; /* pointer to buffer area */
- int use_mmap; /* mmap instead of read */
+mmap_segment(FS_INFO *fsp, int segment, caddr_t *segbuf, int use_mmap)
{
struct lfs *lfsp;
int fid; /* fildes for file system device */
@@ -595,10 +562,7 @@ mmap_segment (fsp, segment, segbuf, use_mmap)
}
void
-munmap_segment (fsp, seg_buf, use_mmap)
- FS_INFO *fsp; /* file system information */
- caddr_t seg_buf; /* pointer to buffer area */
- int use_mmap; /* mmap instead of read/write */
+munmap_segment(FS_INFO *fsp, caddr_t seg_buf, int use_mmap)
{
if (use_mmap)
munmap (seg_buf, seg_size(&fsp->fi_lfs));
@@ -611,9 +575,7 @@ munmap_segment (fsp, seg_buf, use_mmap)
* USEFUL DEBUGGING TOOLS:
*/
void
-print_SEGSUM (lfsp, p)
- struct lfs *lfsp;
- SEGSUM *p;
+print_SEGSUM(struct lfs *lfsp, SEGSUM *p)
{
if (p)
(void) dump_summary(lfsp, p, DUMP_ALL, NULL);
@@ -622,9 +584,7 @@ print_SEGSUM (lfsp, p)
}
int
-bi_compare(a, b)
- const void *a;
- const void *b;
+bi_compare(const void *a, const void *b)
{
const BLOCK_INFO *ba, *bb;
int diff;
@@ -653,10 +613,7 @@ bi_compare(a, b)
}
int
-bi_toss(dummy, a, b)
- const void *dummy;
- const void *a;
- const void *b;
+bi_toss(const void *dummy, const void *a, const void *b)
{
const BLOCK_INFO *ba, *bb;
@@ -667,12 +624,8 @@ bi_toss(dummy, a, b)
}
void
-toss(p, nump, size, dotoss, client)
- void *p;
- int *nump;
- size_t size;
- int (*dotoss)(const void *, const void *, const void *);
- void *client;
+toss(void *p, int *nump, size_t size,
+ int (*dotoss)(const void *, const void *, const void *), void *client)
{
int i;
void *p1;
diff --git a/libexec/lfs_cleanerd/misc.c b/libexec/lfs_cleanerd/misc.c
index 5037318ab41..7f490cdeff6 100644
--- a/libexec/lfs_cleanerd/misc.c
+++ b/libexec/lfs_cleanerd/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.5 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: misc.c,v 1.6 2003/06/11 14:24:46 deraadt Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$OpenBSD: misc.c,v 1.5 2003/06/02 19:38:24 millert Exp $";
+static char rcsid[] = "$OpenBSD: misc.c,v 1.6 2003/06/11 14:24:46 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -62,11 +62,7 @@ err(const int fatal, const char *fmt, ...)
}
void
-get(fd, off, p, len)
- int fd;
- off_t off;
- void *p;
- size_t len;
+get(int fd, off_t off, void *p, size_t len)
{
int rbytes;
diff --git a/libexec/lfs_cleanerd/print.c b/libexec/lfs_cleanerd/print.c
index ecddf2245ab..d58e028eacf 100644
--- a/libexec/lfs_cleanerd/print.c
+++ b/libexec/lfs_cleanerd/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.4 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: print.c,v 1.5 2003/06/11 14:24:46 deraadt Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "@(#)print.c 8.2 (Berkeley) 5/24/95";*/
-static char rcsid[] = "$OpenBSD: print.c,v 1.4 2003/06/02 19:38:24 millert Exp $";
+static char rcsid[] = "$OpenBSD: print.c,v 1.5 2003/06/11 14:24:46 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -52,11 +52,7 @@ static char rcsid[] = "$OpenBSD: print.c,v 1.4 2003/06/02 19:38:24 millert Exp $
* Returns a pointer to the array of inode addresses.
*/
int
-dump_summary(lfsp, sp, flags, iaddrp)
- struct lfs *lfsp;
- SEGSUM *sp;
- u_long flags;
- daddr_t **iaddrp;
+dump_summary(struct lfs *lfsp, SEGSUM *sp, u_long flags, daddr_t **iaddrp)
{
int i, j, numblocks;
daddr_t *dp;
@@ -131,8 +127,7 @@ dump_summary(lfsp, sp, flags, iaddrp)
#ifdef VERBOSE
void
-dump_cleaner_info(ipage)
- void *ipage;
+dump_cleaner_info(void *ipage)
{
CLEANERINFO *cip;
@@ -142,8 +137,7 @@ dump_cleaner_info(ipage)
}
void
-dump_super(lfsp)
- struct lfs *lfsp;
+dump_super(struct lfs *lfsp)
{
int i;
diff --git a/libexec/spamd-setup/spamd-setup.c b/libexec/spamd-setup/spamd-setup.c
index 882be1f25f2..31c9fa1ea5d 100644
--- a/libexec/spamd-setup/spamd-setup.c
+++ b/libexec/spamd-setup/spamd-setup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd-setup.c,v 1.10 2003/05/16 01:01:33 beck Exp $ */
+/* $OpenBSD: spamd-setup.c,v 1.11 2003/06/11 14:24:46 deraadt Exp $ */
/*
* Copyright (c) 2003 Bob Beck. All rights reserved.
*
@@ -652,15 +652,13 @@ getlist(char ** db_array, char *name, struct blacklist *blist,
blc = blistnew->blc;
bls = blistnew->bls;
bl = blistnew->bl;
- }
- else if (cgetcap(buf, "white", ':') != NULL) {
+ } else if (cgetcap(buf, "white", ':') != NULL) {
/* apply to most recent blacklist */
black = 0;
blc = blist->blc;
bls = blist->bls;
bl = blist->bl;
- }
- else
+ } else
errx(1, "Must have \"black\" or \"white\" in %s", name);
switch (cgetstr(buf, "msg", &message)) {
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index 0fcf1d94643..fa7b5606ef3 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.34 2003/05/17 02:41:19 beck Exp $ */
+/* $OpenBSD: spamd.c,v 1.35 2003/06/11 14:24:46 deraadt Exp $ */
/*
* Copyright (c) 2002 Theo de Raadt. All rights reserved.
@@ -90,7 +90,7 @@ char *doreply(struct con *);
void setlog(char *, size_t, char *);
void initcon(struct con *, int, struct sockaddr_in *);
void closecon(struct con *);
-int match(char *, char *);
+int match(const char *, const char *);
void nextstate(struct con *);
void handler(struct con *);
void handlew(struct con *, int one);
@@ -551,7 +551,7 @@ closecon(struct con *cp)
}
int
-match(char *s1, char *s2)
+match(const char *s1, const char *s2)
{
return (strncasecmp(s1, s2, strlen(s2)) == 0);
}
diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c
index 154d795f338..52de9a1c353 100644
--- a/libexec/talkd/announce.c
+++ b/libexec/talkd/announce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: announce.c,v 1.17 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: announce.c,v 1.18 2003/06/11 14:24:46 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)announce.c 5.9 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: announce.c,v 1.17 2003/06/02 19:38:24 millert Exp $";
+static char rcsid[] = "$Id: announce.c,v 1.18 2003/06/11 14:24:46 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -58,9 +58,7 @@ static void print_mesg(FILE *,CTL_MSG *,char *);
* accepting messages, announce that a talk is requested.
*/
int
-announce(request, remote_machine)
- CTL_MSG *request;
- char *remote_machine;
+announce(CTL_MSG *request, char *remote_machine)
{
char full_tty[MAXPATHLEN];
FILE *tf;
@@ -92,10 +90,7 @@ announce(request, remote_machine)
* is in vi at the time
*/
static void
-print_mesg(tf, request, remote_machine)
- FILE *tf;
- CTL_MSG *request;
- char *remote_machine;
+print_mesg(FILE *tf, CTL_MSG *request, char *remote_machine)
{
struct timeval clock;
time_t clocktime;
diff --git a/libexec/talkd/print.c b/libexec/talkd/print.c
index 47fab76aaf4..bd758d5d093 100644
--- a/libexec/talkd/print.c
+++ b/libexec/talkd/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.6 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: print.c,v 1.7 2003/06/11 14:24:46 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)print.c 5.8 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: print.c,v 1.6 2003/06/02 19:38:24 millert Exp $";
+static char rcsid[] = "$Id: print.c,v 1.7 2003/06/11 14:24:46 deraadt Exp $";
#endif /* not lint */
/* debug print routines */
@@ -52,9 +52,7 @@ static char *answers[] =
#define NANSWERS (sizeof(answers) / sizeof(answers[0]))
void
-print_request(cp, mp)
- char *cp;
- CTL_MSG *mp;
+print_request(char *cp, CTL_MSG *mp)
{
char tbuf[80], *tp;
@@ -68,9 +66,7 @@ print_request(cp, mp)
}
void
-print_response(cp, rp)
- char *cp;
- CTL_RESPONSE *rp;
+print_response(char *cp, CTL_RESPONSE *rp)
{
char tbuf[80], *tp, abuf[80], *ap;
diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c
index e1515428dd4..b7cd08ebeec 100644
--- a/libexec/talkd/process.c
+++ b/libexec/talkd/process.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: process.c,v 1.15 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: process.c,v 1.16 2003/06/11 14:24:46 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)process.c 5.10 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: process.c,v 1.15 2003/06/02 19:38:24 millert Exp $";
+static char rcsid[] = "$Id: process.c,v 1.16 2003/06/11 14:24:46 deraadt Exp $";
#endif /* not lint */
/*
@@ -59,9 +59,7 @@ static char rcsid[] = "$Id: process.c,v 1.15 2003/06/02 19:38:24 millert Exp $";
#define satosin(sa) ((struct sockaddr_in *)(sa))
void
-process_request(mp, rp)
- CTL_MSG *mp;
- CTL_RESPONSE *rp;
+process_request(CTL_MSG *mp, CTL_RESPONSE *rp)
{
CTL_MSG *ptr;
char *s;
@@ -148,9 +146,7 @@ process_request(mp, rp)
}
void
-do_announce(mp, rp)
- CTL_MSG *mp;
- CTL_RESPONSE *rp;
+do_announce(CTL_MSG *mp, CTL_RESPONSE *rp)
{
struct hostent *hp;
CTL_MSG *ptr;
@@ -195,9 +191,7 @@ do_announce(mp, rp)
* Search utmp for the local user
*/
int
-find_user(name, tty, ttyl)
- char *name, *tty;
- size_t ttyl;
+find_user(char *name, char *tty, size_t ttyl)
{
struct utmp ubuf, ubuf1;
int status;
diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c
index 1e06eaa4576..d80caa175dd 100644
--- a/libexec/talkd/table.c
+++ b/libexec/talkd/table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table.c,v 1.9 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: table.c,v 1.10 2003/06/11 14:24:46 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)table.c 5.7 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: table.c,v 1.9 2003/06/02 19:38:24 millert Exp $";
+static char rcsid[] = "$Id: table.c,v 1.10 2003/06/11 14:24:46 deraadt Exp $";
#endif /* not lint */
/*
@@ -74,7 +74,7 @@ static void delete(TABLE_ENTRY *);
* Init the table
*/
void
-init_table()
+init_table(void)
{
TAILQ_INIT(&table);
}
@@ -84,8 +84,7 @@ init_table()
* request looking for an invitation
*/
CTL_MSG *
-find_match(request)
- CTL_MSG *request;
+find_match(CTL_MSG *request)
{
TABLE_ENTRY *ptr;
time_t current_time;
@@ -121,8 +120,7 @@ find_match(request)
* one as find_match does
*/
CTL_MSG *
-find_request(request)
- CTL_MSG *request;
+find_request(CTL_MSG *request)
{
TABLE_ENTRY *ptr;
time_t current_time;
@@ -159,9 +157,7 @@ find_request(request)
}
void
-insert_table(request, response)
- CTL_MSG *request;
- CTL_RESPONSE *response;
+insert_table(CTL_MSG *request, CTL_RESPONSE *response)
{
TABLE_ENTRY *ptr;
time_t current_time;
@@ -202,8 +198,7 @@ new_id(void)
* Delete the invitation with id 'id_num'
*/
int
-delete_invite(id_num)
- int id_num;
+delete_invite(int id_num)
{
TABLE_ENTRY *ptr;
@@ -226,8 +221,7 @@ delete_invite(id_num)
* Classic delete from a double-linked list
*/
static void
-delete(ptr)
- TABLE_ENTRY *ptr;
+delete(TABLE_ENTRY *ptr)
{
if (debug)
diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c
index fab7483adfc..af70685d465 100644
--- a/libexec/talkd/talkd.c
+++ b/libexec/talkd/talkd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: talkd.c,v 1.18 2003/06/02 19:38:24 millert Exp $ */
+/* $OpenBSD: talkd.c,v 1.19 2003/06/11 14:24:46 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -37,7 +37,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)talkd.c 5.8 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: talkd.c,v 1.18 2003/06/02 19:38:24 millert Exp $";
+static char rcsid[] = "$Id: talkd.c,v 1.19 2003/06/11 14:24:46 deraadt Exp $";
#endif /* not lint */
/*
@@ -71,9 +71,7 @@ char hostname[MAXHOSTNAMELEN];
#define MAXIDLE 120
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
if (getuid() != 0) {
fprintf(stderr, "%s: getuid: not super-user\n", argv[0]);
@@ -133,7 +131,7 @@ main(argc, argv)
}
void
-timeout()
+timeout(void)
{
int save_errno = errno;