You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ta...@apache.org on 2009/12/29 13:56:45 UTC

svn commit: r894374 - /httpd/httpd/trunk/support/ab.c

Author: takashi
Date: Tue Dec 29 12:56:44 2009
New Revision: 894374

URL: http://svn.apache.org/viewvc?rev=894374&view=rev
Log:
Add parentheses to min max macro functions to avoid future bugs.

Modified:
    httpd/httpd/trunk/support/ab.c

Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=894374&r1=894373&r2=894374&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Tue Dec 29 12:56:44 2009
@@ -270,8 +270,8 @@
     apr_interval_time_t time;     /* time for connection */
 };
 
-#define ap_min(a,b) ((a)<(b))?(a):(b)
-#define ap_max(a,b) ((a)>(b))?(a):(b)
+#define ap_min(a,b) (((a)<(b))?(a):(b))
+#define ap_max(a,b) (((a)>(b))?(a):(b))
 #define ap_round_ms(a) ((apr_time_t)((a) + 500)/1000)
 #define ap_double_ms(a) ((double)(a)/1000.0)
 #define MAX_CONCURRENCY 20000