diff options
author | imp <imp@FreeBSD.org> | 1998-09-13 19:54:54 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1998-09-13 19:54:54 +0000 |
commit | d66621d6c83e71646d0f1d177fc6974f6cd5504d (patch) | |
tree | b8d3050741fe0a4aeb2d6aae1890ec44c3125aa1 /bin | |
parent | c82e121ce74c6eb8a8320558d50687405f5c3b06 (diff) | |
download | FreeBSD-src-d66621d6c83e71646d0f1d177fc6974f6cd5504d.zip FreeBSD-src-d66621d6c83e71646d0f1d177fc6974f6cd5504d.tar.gz |
Fix minor style bugs noticed by the Bruce Filter.[tm]
Bruce-Filter-By: bde
Diffstat (limited to 'bin')
-rw-r--r-- | bin/cat/cat.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/cat/cat.c b/bin/cat/cat.c index c52ae8b..544fba5 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -45,7 +45,7 @@ static char const copyright[] = static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95"; #endif static const char rcsid[] = - "$Id: cat.c,v 1.11 1998/05/13 07:16:37 charnier Exp $"; + "$Id: cat.c,v 1.12 1998/09/11 05:48:06 imp Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -65,11 +65,14 @@ const char *filename; void cook_args __P((char *argv[])); void cook_buf __P((FILE *)); +int main __P((int argc, char *argv[])); void raw_args __P((char *argv[])); void raw_cat __P((int)); int -main(int argc, char **argv) +main(argc, argv) + int argc; + char *argv[]; { int ch; @@ -245,12 +248,12 @@ raw_cat(rfd) if (fstat(wfd, &sbuf)) err(1, "%s", filename); bsize = MAX(sbuf.st_blksize, 1024); - if ((buf = malloc((u_int)bsize)) == NULL) + if ((buf = malloc(bsize)) == NULL) err(1, NULL); } while ((nr = read(rfd, buf, bsize)) > 0) for (off = 0; nr; nr -= nw, off += nw) - if ((nw = write(wfd, buf + off, (size_t) nr)) < 0) + if ((nw = write(wfd, buf + off, (size_t)nr)) < 0) err(1, "stdout"); if (nr < 0) { warn("%s", filename); |