ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-cvs
php-cvs
[PHP-CVS] cvs: php-src /ext/ldap ldap.c
by Ilia Alshanetsky other posts by this author
Jun 28 2004 10:31PM messages near this date
[PHP-CVS] cvs: CVSROOT / avail | [PHP-CVS] cvs: CVSROOT / avail
iliaa		Mon Jun 28 18:31:29 2004 EDT

  Modified files:              
    /php-src/ext/ldap	ldap.c 
  Log:
  Removed pointless allocation check.
  
  
http://cvs.php.net/diff.php/php-src/ext/ldap/ldap.c?r1=1.153&r2=1.154&ty=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.153 php-src/ext/ldap/ldap.c:1.154
--- php-src/ext/ldap/ldap.c:1.153	Tue Jun  1 17:04:33 2004
+++ php-src/ext/ldap/ldap.c	Mon Jun 28 18:31:28 2004
@@ -22,7 +22,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: ldap.c,v 1.153 2004/06/01 21:04:33 iliaa Exp $ */
+/* $Id: ldap.c,v 1.154 2004/06/28 22:31:28 iliaa Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -303,7 +303,7 @@
 
 	php_info_print_table_start();
 	php_info_print_table_row(2, "LDAP Support", "enabled");
-	php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.153 2004/06/01 21:04:33 iliaa 
Exp $");
+	php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.154 2004/06/28 22:31:28 iliaa 
Exp $");
 
 	if (LDAPG(max_links) == -1) {
 		snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
@@ -616,10 +616,7 @@
 			}
 
 			num_attribs = zend_hash_num_elements(Z_ARRVAL_PP(attrs));
-			if ((ldap_attrs = safe_emalloc((num_attribs+1), sizeof(char *), 0)) == NULL) {
-				php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not allocate memory");
-				RETURN_FALSE;
-			}
+			ldap_attrs = safe_emalloc((num_attribs+1), sizeof(char *), 0);
 
 			for (i = 0; i<num_attribs; i++) {
 				if (zend_hash_index_find(Z_ARRVAL_PP(attrs), i, (void **) &attr) == FAILURE) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved