Fix checks for allocation debugging.

MALLOC_DEBUG should not be used to check if debugging is actually
enabled, __AST_DEBUG_MALLOC should be used instead.  MALLOC_DEBUG only
indicates that debugging is requested, __AST_DEBUG_MALLOC indicates it
is active.

Change-Id: I3ce9cdb6ec91b74ee1302941328462231be1ea53
This commit is contained in:
Corey Farrell
2016-08-19 19:19:28 -04:00
parent 8061d9f66f
commit 55ccdf93c3
10 changed files with 47 additions and 47 deletions

View File

@@ -53,7 +53,7 @@ ASTERISK_REGISTER_FILE()
* ast_str_append_va(...)
*/
#if (defined(MALLOC_DEBUG) && !defined(STANDALONE))
#ifdef __AST_DEBUG_MALLOC
int __ast_debug_str_helper(struct ast_str **buf, ssize_t max_len,
int append, const char *fmt, va_list ap, const char *file, int lineno, const char *function)
#else
@@ -112,7 +112,7 @@ int __ast_str_helper(struct ast_str **buf, ssize_t max_len,
}
if (
#if (defined(MALLOC_DEBUG) && !defined(STANDALONE))
#ifdef __AST_DEBUG_MALLOC
_ast_str_make_space(buf, need, file, lineno, function)
#else
ast_str_make_space(buf, need)