[Freeswitch-trunk] [commit] r12698 - freeswitch/trunk/src/include

FreeSWITCH SVN mikej at freeswitch.org
Fri Mar 20 16:01:20 PDT 2009


Author: mikej
Date: Fri Mar 20 18:01:20 2009
New Revision: 12698

Log:
fix macros with missing ( )

Modified:
   freeswitch/trunk/src/include/switch_utils.h

Modified: freeswitch/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/trunk/src/include/switch_utils.h	(original)
+++ freeswitch/trunk/src/include/switch_utils.h	Fri Mar 20 18:01:20 2009
@@ -114,22 +114,22 @@
   \return true or false 
 */
 #define switch_true(expr)\
-(expr && ( !strcasecmp(expr, "yes") ||\
+((expr && ( !strcasecmp(expr, "yes") ||\
 !strcasecmp(expr, "on") ||\
 !strcasecmp(expr, "true") ||\
 !strcasecmp(expr, "enabled") ||\
 !strcasecmp(expr, "active") ||\
 !strcasecmp(expr, "allow") ||\
-atoi(expr))) ? SWITCH_TRUE : SWITCH_FALSE
+atoi(expr))) ? SWITCH_TRUE : SWITCH_FALSE)
 
 #define switch_true_buf(expr)\
-(( !strcasecmp(expr, "yes") ||\
+((( !strcasecmp(expr, "yes") ||\
 !strcasecmp(expr, "on") ||\
 !strcasecmp(expr, "true") ||\
 !strcasecmp(expr, "enabled") ||\
 !strcasecmp(expr, "active") ||\
 !strcasecmp(expr, "allow") ||\
-atoi(expr))) ? SWITCH_TRUE : SWITCH_FALSE
+atoi(expr))) ? SWITCH_TRUE : SWITCH_FALSE)
 
 /*!
   \brief Evaluate the falsefullness of a string expression
@@ -137,13 +137,13 @@
   \return true or false 
 */
 #define switch_false(expr)\
-(expr && ( !strcasecmp(expr, "no") ||\
+((expr && ( !strcasecmp(expr, "no") ||\
 !strcasecmp(expr, "off") ||\
 !strcasecmp(expr, "false") ||\
 !strcasecmp(expr, "disabled") ||\
 !strcasecmp(expr, "inactive") ||\
 !strcasecmp(expr, "disallow") ||\
-!atoi(expr))) ? SWITCH_TRUE : SWITCH_FALSE
+!atoi(expr))) ? SWITCH_TRUE : SWITCH_FALSE)
 
 
 /*!



More information about the Freeswitch-trunk mailing list