mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
cleanup some macros a bit more.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6665 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ff81c16a42
commit
2fcd93c6fc
@ -69,7 +69,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
#pragma include_alias(<libteletone_generate.h>, <../../libs/libteletone/src/libteletone_generate.h>)
|
||||
#pragma include_alias(<libteletone_detect.h>, <../../libs/libteletone/src/libteletone_detect.h>)
|
||||
|
||||
#if (_MSC_VER >= 1500) // VC8+
|
||||
#if (_MSC_VER >= 1500) // VC9+
|
||||
#define switch_assert(expr) assert(expr);__analysis_assume( expr )
|
||||
#endif
|
||||
|
||||
|
@ -352,9 +352,14 @@ SWITCH_DECLARE(char *) switch_find_end_paren(const char *s, char open, char clos
|
||||
#define switch_malloc(ptr, len) (void)( (!!(ptr = malloc(len))) || (fprintf(stderr,"ABORT! Malloc failure at: %s:%s", __FILE__, __LINE__),abort(), 0), ptr )
|
||||
#define switch_zmalloc(ptr, len) (void)( (!!(ptr = malloc(len))) || (fprintf(stderr,"ABORT! Malloc failure at: %s:%s", __FILE__, __LINE__),abort(), 0), memset(ptr, 0, len))
|
||||
#else
|
||||
#if (_MSC_VER >= 1500) // VC9+
|
||||
#define switch_malloc(ptr, len) (void)(assert(((ptr) = malloc((len)))),ptr);__analysis_assume( ptr )
|
||||
#define switch_zmalloc(ptr, len) (void)(assert((ptr = malloc(len))),memset(ptr, 0, len));__analysis_assume( ptr )
|
||||
#else
|
||||
#define switch_malloc(ptr, len) (void)(assert(((ptr) = malloc((len)))),ptr)
|
||||
#define switch_zmalloc(ptr, len) (void)(assert((ptr = malloc(len))),memset(ptr, 0, len))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user