提交 350a739d authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-8650 #resolve [Add switch_must_malloc/switch_must_realloc/switch_must_strdup…

FS-8650 #resolve [Add switch_must_malloc/switch_must_realloc/switch_must_strdup and use it in switch_xml.c]
上级 af5281e9
......@@ -227,6 +227,29 @@ struct switch_core_session;
struct switch_core_runtime;
struct switch_core_port_allocator;
static inline void *switch_must_malloc(size_t _b)
{
void *m = malloc(_b);
switch_assert(m);
return m;
}
static inline void *switch_must_realloc(void *_b, size_t _z)
{
void *m = realloc(_b, _z);
switch_assert(m);
return m;
}
static inline char *switch_must_strdup(const char *_s)
{
char *s = strdup(_s);
switch_assert(s);
return s;
}
/*!
\defgroup core1 Core Library
\ingroup FREESWITCH
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论