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;
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;
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;
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);
}
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);
}