summaryrefslogtreecommitdiffstats
path: root/usr.bin/cksum
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/cksum
parentc86f1a950aeaaedeaeca52ab4e77ca47169e6a5f (diff)
downloadFreeBSD-src-6b76694948a041d2a70fff45f17a6d3cfd92b209.zip
FreeBSD-src-6b76694948a041d2a70fff45f17a6d3cfd92b209.tar.gz
ANSIify function definitions to avoid a warning.
Diffstat (limited to 'usr.bin/cksum')
-rw-r--r--usr.bin/cksum/cksum.c6
-rw-r--r--usr.bin/cksum/crc.c4
-rw-r--r--usr.bin/cksum/crc32.c4
-rw-r--r--usr.bin/cksum/print.c12
-rw-r--r--usr.bin/cksum/sum1.c4
-rw-r--r--usr.bin/cksum/sum2.c4
6 files changed, 9 insertions, 25 deletions
diff --git a/usr.bin/cksum/cksum.c b/usr.bin/cksum/cksum.c
index 3c7f17a..89ba851 100644
--- a/usr.bin/cksum/cksum.c
+++ b/usr.bin/cksum/cksum.c
@@ -62,9 +62,7 @@ __FBSDID("$FreeBSD$");
static void usage(void);
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int ch, fd, rval;
u_int32_t len, val;
@@ -132,7 +130,7 @@ main(argc, argv)
}
static void
-usage()
+usage(void)
{
(void)fprintf(stderr, "usage: cksum [-o 1 | 2 | 3] [file ...]\n");
(void)fprintf(stderr, " sum [file ...]\n");
diff --git a/usr.bin/cksum/crc.c b/usr.bin/cksum/crc.c
index 569304d..da0bc72 100644
--- a/usr.bin/cksum/crc.c
+++ b/usr.bin/cksum/crc.c
@@ -111,9 +111,7 @@ static const u_int32_t crctab[] = {
u_int32_t crc_total = ~0; /* The crc over a number of files. */
int
-crc(fd, cval, clen)
- int fd;
- u_int32_t *cval, *clen;
+crc(int fd, u_int32_t *cval, u_int32_t *clen)
{
u_char *p;
int nr;
diff --git a/usr.bin/cksum/crc32.c b/usr.bin/cksum/crc32.c
index 2c4666b..d6d311b 100644
--- a/usr.bin/cksum/crc32.c
+++ b/usr.bin/cksum/crc32.c
@@ -98,9 +98,7 @@ static const u_int32_t crctab[256] = {
u_int32_t crc32_total = 0 ;
int
-crc32(fd, cval, clen)
- int fd;
- u_int32_t *cval, *clen;
+crc32(int fd, u_int32_t *cval, u_int32_t *clen)
{
u_int32_t lcrc = ~0;
char buf[BUFSIZ], *p ;
diff --git a/usr.bin/cksum/print.c b/usr.bin/cksum/print.c
index ca04996..e23d084 100644
--- a/usr.bin/cksum/print.c
+++ b/usr.bin/cksum/print.c
@@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$");
#include "extern.h"
void
-pcrc(fn, val, len)
- char *fn;
- u_int32_t val, len;
+pcrc(char *fn, u_int32_t val, u_int32_t len)
{
(void)printf("%lu %lu", (u_long) val, (u_long) len);
if (fn)
@@ -55,9 +53,7 @@ pcrc(fn, val, len)
}
void
-psum1(fn, val, len)
- char *fn;
- u_int32_t val, len;
+psum1(char *fn, u_int32_t val, u_int32_t len)
{
(void)printf("%lu %lu", (u_long) val, (u_long) (len + 1023) / 1024);
if (fn)
@@ -66,9 +62,7 @@ psum1(fn, val, len)
}
void
-psum2(fn, val, len)
- char *fn;
- u_int32_t val, len;
+psum2(char *fn, u_int32_t val, u_int32_t len)
{
(void)printf("%lu %lu", (u_long) val, (u_long) (len + 511) / 512);
if (fn)
diff --git a/usr.bin/cksum/sum1.c b/usr.bin/cksum/sum1.c
index a981330..93794f3 100644
--- a/usr.bin/cksum/sum1.c
+++ b/usr.bin/cksum/sum1.c
@@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$");
#include "extern.h"
int
-csum1(fd, cval, clen)
- int fd;
- u_int32_t *cval, *clen;
+csum1(int fd, u_int32_t *cval, u_int32_t *clen)
{
u_int32_t total;
int nr;
diff --git a/usr.bin/cksum/sum2.c b/usr.bin/cksum/sum2.c
index 2514272..b3a6c64 100644
--- a/usr.bin/cksum/sum2.c
+++ b/usr.bin/cksum/sum2.c
@@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$");
#include "extern.h"
int
-csum2(fd, cval, clen)
- int fd;
- u_int32_t *cval, *clen;
+csum2(int fd, u_int32_t *cval, u_int32_t *clen)
{
u_int32_t lcrc, total;
int nr;
OpenPOWER on IntegriCloud