Module Name: src
Committed By: rillig
Date: Mon Aug 31 06:21:07 UTC 2020
Modified Files:
src/usr.bin/make: make.h
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/usr.bin/make/make.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.133 src/usr.bin/make/make.h:1.134
--- src/usr.bin/make/make.h:1.133 Sun Aug 30 14:11:42 2020
+++ src/usr.bin/make/make.h Mon Aug 31 06:21:07 2020
@@ -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 @@ void GNode_FprintDetails(FILE *, const c
#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 */