diff options
author | Corey Farrell <git@cfware.com> | 2016-08-19 19:19:28 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2016-08-24 11:02:47 -0500 |
commit | cb8fd610e20fef4de5f779fda33af7795c9e8a5b (patch) | |
tree | 524b9e663ef7df64ee24053cc452792946891b87 /main/chanvars.c | |
parent | b8b5d52b5e1f81a6116fb23e75cbe5a9d3b94673 (diff) |
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
Diffstat (limited to 'main/chanvars.c')
-rw-r--r-- | main/chanvars.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/chanvars.c b/main/chanvars.c index 37714e9a2..dbb379bbd 100644 --- a/main/chanvars.c +++ b/main/chanvars.c @@ -35,7 +35,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/strings.h" #include "asterisk/utils.h" -#ifdef MALLOC_DEBUG +#ifdef __AST_DEBUG_MALLOC struct ast_var_t *_ast_var_assign(const char *name, const char *value, const char *file, int lineno, const char *function) #else struct ast_var_t *ast_var_assign(const char *name, const char *value) @@ -45,7 +45,7 @@ struct ast_var_t *ast_var_assign(const char *name, const char *value) int name_len = strlen(name) + 1; int value_len = strlen(value) + 1; -#ifdef MALLOC_DEBUG +#ifdef __AST_DEBUG_MALLOC if (!(var = __ast_calloc(sizeof(*var) + name_len + value_len, sizeof(char), file, lineno, function))) { #else if (!(var = ast_calloc(sizeof(*var) + name_len + value_len, sizeof(char)))) { |