summaryrefslogtreecommitdiffstats
path: root/usr.bin/cmp
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-07-28 15:13:17 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-07-28 15:13:17 +0000
commit6b76694948a041d2a70fff45f17a6d3cfd92b209 (patch)
tree28f04322c1c89c99b7621658c5eac4cc8eff696a /usr.bin/cmp
parentc86f1a950aeaaedeaeca52ab4e77ca47169e6a5f (diff)
downloadFreeBSD-src-6b76694948a041d2a70fff45f17a6d3cfd92b209.zip
FreeBSD-src-6b76694948a041d2a70fff45f17a6d3cfd92b209.tar.gz
ANSIify function definitions to avoid a warning.
Diffstat (limited to 'usr.bin/cmp')
-rw-r--r--usr.bin/cmp/cmp.c6
-rw-r--r--usr.bin/cmp/misc.c7
-rw-r--r--usr.bin/cmp/regular.c11
-rw-r--r--usr.bin/cmp/special.c6
4 files changed, 9 insertions, 21 deletions
diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c
index 7a60ee9..0032188 100644
--- a/usr.bin/cmp/cmp.c
+++ b/usr.bin/cmp/cmp.c
@@ -63,9 +63,7 @@ int lflag, sflag, xflag, zflag;
static void usage(void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct stat sb1, sb2;
off_t skip1, skip2;
@@ -169,7 +167,7 @@ main(argc, argv)
}
static void
-usage()
+usage(void)
{
(void)fprintf(stderr,
diff --git a/usr.bin/cmp/misc.c b/usr.bin/cmp/misc.c
index 1211f3b..53c6a9b 100644
--- a/usr.bin/cmp/misc.c
+++ b/usr.bin/cmp/misc.c
@@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
#include "extern.h"
void
-eofmsg(file)
- const char *file;
+eofmsg(const char *file)
{
if (!sflag)
warnx("EOF on %s", file);
@@ -58,9 +57,7 @@ eofmsg(file)
}
void
-diffmsg(file1, file2, byte, line)
- const char *file1, *file2;
- off_t byte, line;
+diffmsg(const char *file1, const char *file2, off_t byte, off_t line)
{
if (!sflag)
(void)printf("%s %s differ: char %lld, line %lld\n",
diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c
index 982e1b5..7e38fcd 100644
--- a/usr.bin/cmp/regular.c
+++ b/usr.bin/cmp/regular.c
@@ -59,10 +59,8 @@ static u_char *remmap(u_char *, int, off_t);
#define ROUNDPAGE(i) ((i) & ~pagemask)
void
-c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2)
- int fd1, fd2;
- const char *file1, *file2;
- off_t skip1, len1, skip2, len2;
+c_regular(int fd1, const char *file1, off_t skip1, off_t len1,
+ int fd2, const char *file2, off_t skip2, off_t len2)
{
u_char ch, *p1, *p2, *m1, *m2, *e1, *e2;
off_t byte, length, line;
@@ -147,10 +145,7 @@ c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2)
}
static u_char *
-remmap(mem, fd, offset)
- u_char *mem;
- int fd;
- off_t offset;
+remmap(u_char *mem, int fd, off_t offset)
{
if (mem != NULL)
munmap(mem, MMAP_CHUNK);
diff --git a/usr.bin/cmp/special.c b/usr.bin/cmp/special.c
index f08cae5..754013b 100644
--- a/usr.bin/cmp/special.c
+++ b/usr.bin/cmp/special.c
@@ -50,10 +50,8 @@ __FBSDID("$FreeBSD$");
#include "extern.h"
void
-c_special(fd1, file1, skip1, fd2, file2, skip2)
- int fd1, fd2;
- const char *file1, *file2;
- off_t skip1, skip2;
+c_special(int fd1, const char *file1, off_t skip1,
+ int fd2, const char *file2, off_t skip2)
{
int ch1, ch2;
off_t byte, line;
OpenPOWER on IntegriCloud