diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2018-03-13 13:54:19 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2018-03-13 13:54:19 -0500 |
commit | 4b7872c9db995e99e91fc45adfd133094a51cde3 (patch) | |
tree | b2feecc216608f39b178c0a66503a033217561f3 /main/config.c | |
parent | a979e52c0a351b6784530be04c0b096a7428a720 (diff) | |
parent | c711e4076a6913e18e27a694bcb3fb721822fb58 (diff) |
Merge "core: Remove ABI effects of MALLOC_DEBUG."
Diffstat (limited to 'main/config.c')
-rw-r--r-- | main/config.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/main/config.c b/main/config.c index 38192ed25..dfa6f0923 100644 --- a/main/config.c +++ b/main/config.c @@ -281,11 +281,7 @@ struct ast_config_include { static void ast_variable_destroy(struct ast_variable *doomed); static void ast_includes_destroy(struct ast_config_include *incls); -#ifdef __AST_DEBUG_MALLOC struct ast_variable *_ast_variable_new(const char *name, const char *value, const char *filename, const char *file, const char *func, int lineno) -#else -struct ast_variable *ast_variable_new(const char *name, const char *value, const char *filename) -#endif { struct ast_variable *variable; int name_len = strlen(name) + 1; @@ -297,13 +293,9 @@ struct ast_variable *ast_variable_new(const char *name, const char *value, const fn_len = MIN_VARIABLE_FNAME_SPACE; } - if ( -#ifdef __AST_DEBUG_MALLOC - (variable = __ast_calloc(1, fn_len + name_len + val_len + sizeof(*variable), file, lineno, func)) -#else - (variable = ast_calloc(1, fn_len + name_len + val_len + sizeof(*variable))) -#endif - ) { + variable = __ast_calloc(1, fn_len + name_len + val_len + sizeof(*variable), + file, lineno, func); + if (variable) { char *dst = variable->stuff; /* writable space starts here */ /* Put file first so ast_include_rename() can calculate space available. */ |