Module Name: othersrc Committed By: dholland Date: Mon Feb 25 02:57:51 UTC 2013
Modified Files: othersrc/usr.bin/dholland-make2: buf.c Log Message: We have MAX(), we don't also need max(). To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/usr.bin/dholland-make2/buf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: othersrc/usr.bin/dholland-make2/buf.c diff -u othersrc/usr.bin/dholland-make2/buf.c:1.1.1.1 othersrc/usr.bin/dholland-make2/buf.c:1.2 --- othersrc/usr.bin/dholland-make2/buf.c:1.1.1.1 Mon Feb 25 01:32:49 2013 +++ othersrc/usr.bin/dholland-make2/buf.c Mon Feb 25 02:57:50 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.1.1.1 2013/02/25 01:32:49 dholland Exp $ */ +/* $NetBSD: buf.c,v 1.2 2013/02/25 02:57:50 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: buf.c,v 1.1.1.1 2013/02/25 01:32:49 dholland Exp $"; +static char rcsid[] = "$NetBSD: buf.c,v 1.2 2013/02/25 02:57:50 dholland Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)buf.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: buf.c,v 1.1.1.1 2013/02/25 01:32:49 dholland Exp $"); +__RCSID("$NetBSD: buf.c,v 1.2 2013/02/25 02:57:50 dholland Exp $"); #endif #endif /* not lint */ #endif @@ -90,10 +90,6 @@ __RCSID("$NetBSD: buf.c,v 1.1.1.1 2013/0 #include "make.h" #include "buf.h" -#ifndef max -#define max(a,b) ((a) > (b) ? (a) : (b)) -#endif - #define BUF_DEF_SIZE 256 /* Default buffer size */ /*- @@ -106,7 +102,7 @@ __RCSID("$NetBSD: buf.c,v 1.1.1.1 2013/0 void Buf_Expand_1(Buffer *bp) { - bp->size += max(bp->size, 16); + bp->size += MAX(bp->size, 16); bp->buffer = bmake_realloc(bp->buffer, bp->size); } @@ -130,7 +126,7 @@ Buf_AddBytes(Buffer *bp, int numBytes, c Byte *ptr; if (__predict_false(count + numBytes >= bp->size)) { - bp->size += max(bp->size, numBytes + 16); + bp->size += MAX(bp->size, numBytes + 16); bp->buffer = bmake_realloc(bp->buffer, bp->size); }