提交 c5991622 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8417 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 1ea027f3
...@@ -55,10 +55,17 @@ SWITCH_BEGIN_EXTERN_C ...@@ -55,10 +55,17 @@ SWITCH_BEGIN_EXTERN_C
#define switch_is_file_path(file) (file && ((*file == '/') || strstr(file, SWITCH_URL_SEPARATOR))) #define switch_is_file_path(file) (file && ((*file == '/') || strstr(file, SWITCH_URL_SEPARATOR)))
#endif #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) 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_FALSE;
} }
return SWITCH_TRUE; return SWITCH_TRUE;
...@@ -277,13 +284,6 @@ static inline switch_bool_t switch_strstr(char *s, char *q) ...@@ -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 \brief Make a null string a blank string instead
\param s the string to test \param s the string to test
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论