[svn-commits] trunk - r8368 /trunk/include/asterisk/utils.h

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Jan 20 20:09:02 MST 2006


Author: russell
Date: Fri Jan 20 21:09:01 2006
New Revision: 8368

URL: http://svn.digium.com/view/asterisk?rev=8368&view=rev
Log:
remove optimization where its benefits are negligible

Modified:
    trunk/include/asterisk/utils.h

Modified: trunk/include/asterisk/utils.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/utils.h?rev=8368&r1=8367&r2=8368&view=diff
==============================================================================
--- trunk/include/asterisk/utils.h (original)
+++ trunk/include/asterisk/utils.h Fri Jan 20 21:09:01 2006
@@ -261,7 +261,7 @@
 
 	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 @@
 
 	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 @@
 
 	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 @@
 	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 @@
 	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);
 	}
 



More information about the svn-commits mailing list