diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-21 03:09:01 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-21 03:09:01 +0000 |
commit | 5ca38239e1abca413e1ab6b06fea1de4a4f79c1e (patch) | |
tree | 63e54b6fa250936daf7348b489bc931614284bcf /include | |
parent | 708a7ca40ebcaac8a62cdac9eebd3326116ea1d8 (diff) |
remove optimization where its benefits are negligible
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8368 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/utils.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 070a6af0d..91f12c1e9 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -261,7 +261,7 @@ void *_ast_malloc(size_t len, const char *file, int lineno, const char *func), p = malloc(len); - if (__builtin_expect(!p, 0)) + if (!p) ast_log(LOG_ERROR, "Memory Allocation Failure - '%d' bytes in function %s at line %d of %s\n", (int)len, func, lineno, file); return p; @@ -286,7 +286,7 @@ void *_ast_calloc(size_t num, size_t len, const char *file, int lineno, const ch p = calloc(num, len); - if (__builtin_expect(!p, 0)) + if (!p) ast_log(LOG_ERROR, "Memory Allocation Failure - '%d' bytes in function %s at line %d of %s\n", (int)len, func, lineno, file); return p; @@ -311,7 +311,7 @@ void *_ast_realloc(void *p, size_t len, const char *file, int lineno, const char newp = realloc(p, len); - if (__builtin_expect(!newp, 0)) + if (!newp) ast_log(LOG_ERROR, "Memory Allocation Failure - '%d' bytes in function %s at line %d of %s\n", (int)len, func, lineno, file); return newp; @@ -341,7 +341,7 @@ char *_ast_strdup(const char *str, const char *file, int lineno, const char *fun if (str) { newstr = strdup(str); - if (__builtin_expect(!newstr, 0)) + if (!newstr) ast_log(LOG_ERROR, "Memory Allocation Failure - Could not duplicate '%s' in function %s at line %d of %s\n", str, func, lineno, file); } @@ -372,7 +372,7 @@ char *_ast_strndup(const char *str, size_t len, const char *file, int lineno, co if (str) { newstr = strndup(str, len); - if (__builtin_expect(!newstr, 0)) + if (!newstr) ast_log(LOG_ERROR, "Memory Allocation Failure - Could not duplicate '%d' bytes of '%s' in function %s at line %d of %s\n", (int)len, str, func, lineno, file); } |