Source-Changes-HG archive

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

[src/trunk]: src/bin/cat Don't use MAX(); not all systems have it, and this i...



details:   https://anonhg.NetBSD.org/src/rev/d15e9584f635
branches:  trunk
changeset: 536347:d15e9584f635
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Sep 13 18:07:52 2002 +0000

description:
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 f31ce76f9067 -r d15e9584f635 bin/cat/cat.c
--- a/bin/cat/cat.c     Fri Sep 13 17:36:00 2002 +0000
+++ b/bin/cat/cat.c     Fri Sep 13 18:07:52 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cat.c,v 1.34 2002/06/11 22:05:07 bjh21 Exp $       */
+/* $NetBSD: cat.c,v 1.35 2002/09/13 18:07:52 thorpej 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.34 2002/06/11 22:05:07 bjh21 Exp $");
+__RCSID("$NetBSD: cat.c,v 1.35 2002/09/13 18:07:52 thorpej Exp $");
 #endif
 #endif /* not lint */
 
@@ -294,7 +294,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