Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/bin/cat Pull up revision 1.35 (requested by thorpej in ...



details:   https://anonhg.NetBSD.org/src/rev/c00741884194
branches:  netbsd-1-6
changeset: 529260:c00741884194
user:      he <he%NetBSD.org@localhost>
date:      Sun Nov 03 14:22:30 2002 +0000

description:
Pull up revision 1.35 (requested by thorpej in ticket #793):
  Don't use MAX(); not all systems have it, and this is a host
  tool.

diffstat:

 bin/cat/cat.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r f12cce1b4211 -r c00741884194 bin/cat/cat.c
--- a/bin/cat/cat.c     Sun Nov 03 14:18:34 2002 +0000
+++ b/bin/cat/cat.c     Sun Nov 03 14:22:30 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cat.c,v 1.31.2.1 2002/06/11 15:45:25 lukem Exp $   */
+/* $NetBSD: cat.c,v 1.31.2.2 2002/11/03 14:22:30 he Exp $      */
 
 /*
  * Copyright (c) 1989, 1993
@@ -47,7 +47,7 @@
 #if 0
 static char sccsid[] = "@(#)cat.c      8.2 (Berkeley) 4/27/95";
 #else
-__RCSID("$NetBSD: cat.c,v 1.31.2.1 2002/06/11 15:45:25 lukem Exp $");
+__RCSID("$NetBSD: cat.c,v 1.31.2.2 2002/11/03 14:22:30 he Exp $");
 #endif
 #endif /* not lint */
 
@@ -293,7 +293,8 @@
        wfd = fileno(stdout);
        if (buf == NULL) {
                if (fstat(wfd, &sbuf) == 0) {
-                       bsize = MAX(sbuf.st_blksize, BUFSIZ);
+                       bsize = sbuf.st_blksize > BUFSIZ ?
+                           sbuf.st_blksize : BUFSIZ;
                        buf = malloc(bsize);
                }
                if (buf == NULL) {



Home | Main Index | Thread Index | Old Index