Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make(1): parenthesize macro arguments



details:   https://anonhg.NetBSD.org/src/rev/e10a57779dbd
branches:  trunk
changeset: 975530:e10a57779dbd
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Aug 31 06:21:07 2020 +0000

description:
make(1): parenthesize macro arguments

Just in case anyone wants to use them for copy-and-paste.

The invocations of these macros are left cautious since the
system-provided definition of these macros may have forgotten the
parentheses as well.

diffstat:

 usr.bin/make/make.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 36ab572cbda7 -r e10a57779dbd usr.bin/make/make.h
--- a/usr.bin/make/make.h       Mon Aug 31 06:20:06 2020 +0000
+++ b/usr.bin/make/make.h       Mon Aug 31 06:21:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.h,v 1.133 2020/08/30 14:11:42 rillig Exp $        */
+/*     $NetBSD: make.h,v 1.134 2020/08/31 06:21:07 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -552,10 +552,10 @@
 #endif
 
 #ifndef MIN
-#define MIN(a, b) ((a < b) ? a : b)
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
 #endif
 #ifndef MAX
-#define MAX(a, b) ((a > b) ? a : b)
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
 #endif
 
 /* At least GNU/Hurd systems lack hardcoded MAXPATHLEN/PATH_MAX */



Home | Main Index | Thread Index | Old Index