Skip to content
Snippets Groups Projects
Commit 5d2cd87f authored by Russell Bryant's avatar Russell Bryant
Browse files

remove optimization where its benefits are negligible

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent a501cdb8
No related branches found
No related tags found
No related merge requests found
...@@ -261,7 +261,7 @@ void *_ast_malloc(size_t len, const char *file, int lineno, const char *func), ...@@ -261,7 +261,7 @@ void *_ast_malloc(size_t len, const char *file, int lineno, const char *func),
p = malloc(len); 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); 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; return p;
...@@ -286,7 +286,7 @@ void *_ast_calloc(size_t num, size_t len, const char *file, int lineno, const ch ...@@ -286,7 +286,7 @@ void *_ast_calloc(size_t num, size_t len, const char *file, int lineno, const ch
p = calloc(num, len); 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); 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; return p;
...@@ -311,7 +311,7 @@ void *_ast_realloc(void *p, size_t len, const char *file, int lineno, const char ...@@ -311,7 +311,7 @@ void *_ast_realloc(void *p, size_t len, const char *file, int lineno, const char
newp = realloc(p, len); 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); 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; return newp;
...@@ -341,7 +341,7 @@ char *_ast_strdup(const char *str, const char *file, int lineno, const char *fun ...@@ -341,7 +341,7 @@ char *_ast_strdup(const char *str, const char *file, int lineno, const char *fun
if (str) { if (str) {
newstr = strdup(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); 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 ...@@ -372,7 +372,7 @@ char *_ast_strndup(const char *str, size_t len, const char *file, int lineno, co
if (str) { if (str) {
newstr = strndup(str, len); 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); 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);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment