Blame SOURCES/autofs-5.0.8-fix-max-declaration.patch

4d476f
autofs-5.0.8 - fix max() declaration
4d476f
4d476f
From: Ian Kent <raven@themaw.net>
4d476f
4d476f
Use a name other than the already defined max().
4d476f
---
4d476f
 CHANGELOG            |    1 +
4d476f
 modules/replicated.c |    6 +++---
4d476f
 2 files changed, 4 insertions(+), 3 deletions(-)
4d476f
4d476f
--- autofs-5.0.7.orig/CHANGELOG
4d476f
+++ autofs-5.0.7/CHANGELOG
4d476f
@@ -75,6 +75,7 @@
4d476f
 - check for non existent negative entries in lookup_ghost().
4d476f
 - fix options compare.
4d476f
 - fix fix options compare.
4d476f
+- fix max() declaration.
4d476f
 
4d476f
 25/07/2012 autofs-5.0.7
4d476f
 =======================
4d476f
--- autofs-5.0.7.orig/modules/replicated.c
4d476f
+++ autofs-5.0.7/modules/replicated.c
4d476f
@@ -73,8 +73,8 @@ static int volatile ifc_last_len = 0;
4d476f
 /* Get numeric value of the n bits starting at position p */
4d476f
 #define getbits(x, p, n)	((x >> (p + 1 - n)) & ~(~0 << n))
4d476f
 
4d476f
-#define max(x, y)	(x >= y ? x : y)
4d476f
-#define mmax(x, y, z)	(max(x, y) == x ? max(x, z) : max(y, z))
4d476f
+#define mymax(x, y)	(x >= y ? x : y)
4d476f
+#define mmax(x, y, z)	(mymax(x, y) == x ? mymax(x, z) : mymax(y, z))
4d476f
 
4d476f
 unsigned int ipv6_mask_cmp(uint32_t *host, uint32_t *iface, uint32_t *mask)
4d476f
 {
4d476f
@@ -961,7 +961,7 @@ int prune_host_list(unsigned logopt, str
4d476f
 
4d476f
 	max_tcp_count = mmax(v4_tcp_count, v3_tcp_count, v2_tcp_count);
4d476f
 	max_udp_count = mmax(v4_udp_count, v3_udp_count, v2_udp_count);
4d476f
-	max_count = max(max_tcp_count, max_udp_count);
4d476f
+	max_count = mymax(max_tcp_count, max_udp_count);
4d476f
 
4d476f
 	if (max_count == v4_tcp_count) {
4d476f
 		selected_version = NFS4_TCP_SUPPORTED;