From c599162209f537e6f5d21027ab5b4fe18a17cb61 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 15 May 2008 19:38:29 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8417 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_utils.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h index 9a67cd5e4e..74b20bf6c2 100644 --- a/src/include/switch_utils.h +++ b/src/include/switch_utils.h @@ -55,10 +55,17 @@ SWITCH_BEGIN_EXTERN_C #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; @@ -277,13 +284,6 @@ static inline switch_bool_t switch_strstr(char *s, char *q) } -/*! - \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