From bb2c669165e902d6d52b625cd88b0c1b59fb2ead Mon Sep 17 00:00:00 2001 From: wiz Date: Sun, 16 Sep 2001 12:12:13 +0000 Subject: [PATCH] Some KNF, via patch by Petri Koistinen in private mail. --- bin/cat/cat.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 805452bf9fc5..189bed7d19e4 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -1,4 +1,4 @@ -/* $NetBSD: cat.c,v 1.27 2001/07/29 22:40:57 wiz Exp $ */ +/* $NetBSD: cat.c,v 1.28 2001/09/16 12:12:13 wiz Exp $ */ /* * Copyright (c) 1989, 1993 @@ -47,7 +47,7 @@ __COPYRIGHT( #if 0 static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95"; #else -__RCSID("$NetBSD: cat.c,v 1.27 2001/07/29 22:40:57 wiz Exp $"); +__RCSID("$NetBSD: cat.c,v 1.28 2001/09/16 12:12:13 wiz Exp $"); #endif #endif /* not lint */ @@ -79,6 +79,7 @@ main(int argc, char *argv[]) { int ch; + setprogname(argv[0]); (void)setlocale(LC_ALL, ""); while ((ch = getopt(argc, argv, "befnstuv")) != -1) @@ -268,12 +269,13 @@ skip: void raw_cat(int rfd) { - int wfd; static char *buf; static char fb_buf[BUFSIZ]; - struct stat sbuf; static size_t bsize; + + struct stat sbuf; ssize_t nr, nw, off; + int wfd; wfd = fileno(stdout); if (buf == NULL) {