[commit] r8417 - freeswitch/trunk/src/include
Author: anthm Date: Thu May 15 15:38:29 2008 New Revision: 8417 Modified: freeswitch/trunk/src/include/switch_utils.h Log: update Modified: freeswitch/trunk/src/include/switch_utils.h ============================================================================== --- freeswitch/trunk/src/include/switch_utils.h (original) +++ freeswitch/trunk/src/include/switch_utils.h Thu May 15 15:38:29 2008 @@ -55,10 +55,17 @@ #define switch_is_file_path(file) (file && ((*file == '/') || strstr(file, SWITCH_URL_SEPARATOR))) #endif +/*! + \brief Test for NULL or zero length string + \param s the string to test + \return true value if the string is NULL or zero length +*/ +#define switch_strlen_zero(s) (!s || *s == '\0') + static inline switch_bool_t switch_is_moh(const char *s) { - if (!strcasecmp(s, "silence") || !strcasecmp(s, "indicate_hold")) { + if (switch_strlen_zero(s) || !strcasecmp(s, "silence") || !strcasecmp(s, "indicate_hold")) { return SWITCH_FALSE; } return SWITCH_TRUE; @@ -278,13 +285,6 @@ /*! - \brief Test for NULL or zero length string - \param s the string to test - \return true value if the string is NULL or zero length -*/ -#define switch_strlen_zero(s) (!s || *s == '\0') - -/*! \brief Make a null string a blank string instead \param s the string to test \return the original string or blank string.
participants (1)
-
Freeswitch SVN