]> granicus.if.org Git - apache/commitdiff
Add parentheses to min max macro functions to avoid future bugs.
authorTakashi Sato <takashi@apache.org>
Tue, 29 Dec 2009 12:56:44 +0000 (12:56 +0000)
committerTakashi Sato <takashi@apache.org>
Tue, 29 Dec 2009 12:56:44 +0000 (12:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@894374 13f79535-47bb-0310-9956-ffa450edef68

support/ab.c

index 18a55029d2fec2ce9cab0efbf54264d378244e56..734176596fce5059d901385940dea502d4db2a51 100644 (file)
@@ -270,8 +270,8 @@ struct data {
     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