diff options
author | 2002-07-13 06:02:57 +0000 | |
---|---|---|
committer | 2002-07-13 06:02:57 +0000 | |
commit | d3a005fc1b7aeaf154579c0b964c6d45543b9144 (patch) | |
tree | a56adb5607331c3870f378c2c9f80bced516516c | |
parent | make sure to clean all files. (diff) | |
download | wireguard-openbsd-d3a005fc1b7aeaf154579c0b964c6d45543b9144.tar.xz wireguard-openbsd-d3a005fc1b7aeaf154579c0b964c6d45543b9144.zip |
ansi
-rw-r--r-- | usr.bin/fstat/fstat.c | 71 | ||||
-rw-r--r-- | usr.bin/fstat/isofs.c | 6 | ||||
-rw-r--r-- | usr.bin/uniq/uniq.c | 25 |
3 files changed, 30 insertions, 72 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 1bfd1d68d03..a30de10de47 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstat.c,v 1.39 2002/06/12 06:07:15 mpech Exp $ */ +/* $OpenBSD: fstat.c,v 1.40 2002/07/13 06:02:57 deraadt Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$OpenBSD: fstat.c,v 1.39 2002/06/12 06:07:15 mpech Exp $"; +static char *rcsid = "$OpenBSD: fstat.c,v 1.40 2002/07/13 06:02:57 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -168,9 +168,7 @@ void cryptotrans(void *, int i); void systracetrans(struct fsystrace *, int i); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { extern char *optarg; extern int optind; @@ -311,8 +309,7 @@ pid_t Pid; * print open files attributed to this process */ void -dofiles(kp) - struct kinfo_proc *kp; +dofiles(struct kinfo_proc *kp) { int i; struct file file; @@ -401,11 +398,7 @@ dofiles(kp) } void -vtrans(vp, i, flag, offset) - struct vnode *vp; - int i; - int flag; - off_t offset; +vtrans(struct vnode *vp, int i, int flag, off_t offset) { struct vnode vn; struct filestat fst; @@ -522,9 +515,7 @@ vtrans(vp, i, flag, offset) } int -ufs_filestat(vp, fsp) - struct vnode *vp; - struct filestat *fsp; +ufs_filestat(struct vnode *vp, struct filestat *fsp) { struct inode inode; @@ -543,9 +534,7 @@ ufs_filestat(vp, fsp) } int -ext2fs_filestat(vp, fsp) - struct vnode *vp; - struct filestat *fsp; +ext2fs_filestat(struct vnode *vp, struct filestat *fsp) { struct inode inode; @@ -564,9 +553,7 @@ ext2fs_filestat(vp, fsp) } int -msdos_filestat(vp, fsp) - struct vnode *vp; - struct filestat *fsp; +msdos_filestat(struct vnode *vp, struct filestat *fsp) { #if 0 struct inode inode; @@ -587,9 +574,7 @@ msdos_filestat(vp, fsp) } int -nfs_filestat(vp, fsp) - struct vnode *vp; - struct filestat *fsp; +nfs_filestat(struct vnode *vp, struct filestat *fsp) { struct nfsnode nfsnode; mode_t mode; @@ -656,9 +641,7 @@ xfs_filestat(vp, fsp) } int -null_filestat(vp, fsp) - struct vnode *vp; - struct filestat *fsp; +null_filestat(struct vnode *vp, struct filestat *fsp) { struct null_node node; struct filestat fst; @@ -733,8 +716,7 @@ null_filestat(vp, fsp) } char * -getmnton(m) - struct mount *m; +getmnton(struct mount *m) { static struct mount mount; static struct mtab { @@ -761,9 +743,7 @@ getmnton(m) } void -pipetrans(pipe, i) - struct pipe *pipe; - int i; +pipetrans(struct pipe *pipe, int i) { struct pipe pi; void *maxaddr; @@ -796,9 +776,7 @@ bad: } void -kqueuetrans(kq, i) - struct kqueue *kq; - int i; +kqueuetrans(struct kqueue *kq, int i) { struct kqueue kqi; @@ -821,24 +799,17 @@ bad: } void -cryptotrans(f, i) - void *f; - int i; +cryptotrans(void *f, int i) { PREFIX(i); printf(" "); printf("crypto %p\n", f); - return; -bad: - printf("* error\n"); } void -systracetrans(f, i) - struct fsystrace *f; - int i; +systracetrans(struct fsystrace *f, int i) { struct fsystrace fi; @@ -860,8 +831,7 @@ bad: #ifdef INET6 const char * -inet6_addrstr(p) - struct in6_addr *p; +inet6_addrstr(struct in6_addr *p) { struct sockaddr_in6 sin6; static char hbuf[NI_MAXHOST]; @@ -891,9 +861,7 @@ inet6_addrstr(p) #endif void -socktrans(sock, i) - struct socket *sock; - int i; +socktrans(struct socket *sock, int i) { static char *stypename[] = { "unused", /* 0 */ @@ -1114,8 +1082,7 @@ getinetproto(number) } int -getfname(filename) - char *filename; +getfname(char *filename) { struct stat statbuf; DEVS *cur; @@ -1136,7 +1103,7 @@ getfname(filename) } void -usage() +usage(void) { fprintf(stderr, "usage: fstat [-fnv] [-p pid] [-u user] " "[-N system] [-M core] [file ...]\n"); diff --git a/usr.bin/fstat/isofs.c b/usr.bin/fstat/isofs.c index 2035c7065f6..767d2a48ae3 100644 --- a/usr.bin/fstat/isofs.c +++ b/usr.bin/fstat/isofs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isofs.c,v 1.4 2002/06/12 06:07:15 mpech Exp $ */ +/* $OpenBSD: isofs.c,v 1.5 2002/07/13 06:02:57 deraadt Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -78,9 +78,7 @@ extern pid_t Pid; int -isofs_filestat(vp, fsp) - struct vnode *vp; - struct filestat *fsp; +isofs_filestat(struct vnode *vp, struct filestat *fsp) { struct iso_node inode; diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 0c3409923ae..448dac30f6c 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uniq.c,v 1.9 2002/02/16 21:27:56 millert Exp $ */ +/* $OpenBSD: uniq.c,v 1.10 2002/07/13 06:04:24 deraadt Exp $ */ /* $NetBSD: uniq.c,v 1.7 1995/08/31 22:03:48 jtc Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)uniq.c 8.3 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: uniq.c,v 1.9 2002/02/16 21:27:56 millert Exp $"; +static char rcsid[] = "$OpenBSD: uniq.c,v 1.10 2002/07/13 06:04:24 deraadt Exp $"; #endif /* not lint */ #include <errno.h> @@ -70,12 +70,10 @@ void obsolete(char *[]); void usage(void); int -main (argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { char *t1, *t2; - FILE *ifp, *ofp; + FILE *ifp = NULL, *ofp = NULL; int ch; char *prevline, *thisline, *p; @@ -174,9 +172,7 @@ done: argc -= optind; * of the line. */ void -show(ofp, str) - FILE *ofp; - char *str; +show(FILE *ofp, char *str) { if (cflag && *str) @@ -186,8 +182,7 @@ show(ofp, str) } char * -skip(str) - char *str; +skip(char *str) { int infield, nchars, nfields; @@ -204,8 +199,7 @@ skip(str) } FILE * -file(name, mode) - char *name, *mode; +file(char *name, char *mode) { FILE *fp; @@ -215,8 +209,7 @@ file(name, mode) } void -obsolete(argv) - char *argv[]; +obsolete(char *argv[]) { int len; char *ap, *p, *start; @@ -245,7 +238,7 @@ obsolete(argv) } void -usage() +usage(void) { (void)fprintf(stderr, "usage: uniq [-c | -du] [-f fields] [-s chars] [input [output]]\n"); |