summaryrefslogtreecommitdiff
path: root/usr.bin/touch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-10 22:20:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-10 22:20:55 +0000
commitb8aaa8bec8414f8e55cf9b61fe0873d242c773b8 (patch)
tree5e43016c4fae834239fd38972fd58355ed6b54b5 /usr.bin/touch
parentf18f6607440f6d2da08fac3522d88a65c77a5f3e (diff)
mostly ansi cleanup; pval ok
Diffstat (limited to 'usr.bin/touch')
-rw-r--r--usr.bin/touch/touch.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/usr.bin/touch/touch.c b/usr.bin/touch/touch.c
index 67dcda028d3..1ba5036ae9b 100644
--- a/usr.bin/touch/touch.c
+++ b/usr.bin/touch/touch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: touch.c,v 1.9 2003/06/03 02:56:20 millert Exp $ */
+/* $OpenBSD: touch.c,v 1.10 2003/06/10 22:20:53 deraadt Exp $ */
/* $NetBSD: touch.c,v 1.11 1995/08/31 22:10:06 jtc Exp $ */
/*
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)touch.c 8.2 (Berkeley) 4/28/95";
#endif
-static char rcsid[] = "$OpenBSD: touch.c,v 1.9 2003/06/03 02:56:20 millert Exp $";
+static char rcsid[] = "$OpenBSD: touch.c,v 1.10 2003/06/10 22:20:53 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -65,9 +65,7 @@ void stime_file(char *, struct timeval *);
void usage(void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct stat sb;
struct timeval tv[2];
@@ -187,9 +185,7 @@ main(argc, argv)
#define ATOI2(s) ((s) += 2, ((s)[-2] - '0') * 10 + ((s)[-1] - '0'))
void
-stime_arg1(arg, tvp)
- char *arg;
- struct timeval *tvp;
+stime_arg1(char *arg, struct timeval *tvp)
{
struct tm *t;
time_t tmptime;
@@ -248,10 +244,7 @@ terr: errx(1,
}
void
-stime_arg2(arg, year, tvp)
- char *arg;
- int year;
- struct timeval *tvp;
+stime_arg2(char *arg, int year, struct timeval *tvp)
{
struct tm *t;
time_t tmptime;
@@ -284,9 +277,7 @@ stime_arg2(arg, year, tvp)
}
void
-stime_file(fname, tvp)
- char *fname;
- struct timeval *tvp;
+stime_file(char *fname, struct timeval *tvp)
{
struct stat sb;
@@ -297,10 +288,7 @@ stime_file(fname, tvp)
}
int
-rw(fname, sbp, force)
- char *fname;
- struct stat *sbp;
- int force;
+rw(char *fname, struct stat *sbp, int force)
{
int fd, needed_chmod, rval;
u_char byte;
@@ -349,7 +337,7 @@ err: rval = 1;
}
__dead void
-usage()
+usage(void)
{
(void)fprintf(stderr,
"usage: touch [-acfm] [-r file] [-t time] file ...\n");