summaryrefslogtreecommitdiff
path: root/ext/xml
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-01-18 19:28:10 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-01-18 19:28:10 +0000
commit72b356c1bccb511e9a3414cbfe6ff25b5a20b91f (patch)
treeb5ac19d75d629c064e8e68bd3182b594760f33be /ext/xml
parent94c25df5923aa6d91c0431fdde940afd3d843f08 (diff)
downloadphp-git-72b356c1bccb511e9a3414cbfe6ff25b5a20b91f.tar.gz
Removed pointless memory allocation checks.
Diffstat (limited to 'ext/xml')
-rw-r--r--ext/xml/php_xml.h4
-rw-r--r--ext/xml/xml.c7
2 files changed, 1 insertions, 10 deletions
diff --git a/ext/xml/php_xml.h b/ext/xml/php_xml.h
index b1232c2c0b..2504f8b6c2 100644
--- a/ext/xml/php_xml.h
+++ b/ext/xml/php_xml.h
@@ -98,10 +98,6 @@ enum php_xml_option {
PHP_XML_OPTION_SKIP_WHITE
};
-#define RETURN_OUT_OF_MEMORY \
- php_error(E_WARNING, "Out of memory");\
- RETURN_FALSE
-
/* for xml_parse_into_struct */
#define XML_MAXLEVEL 255 /* XXX this should be dynamic */
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index b40bc1743f..67c094c396 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -594,12 +594,7 @@ static void _xml_add_to_info(xml_parser *parser,char *name)
if (zend_hash_find(Z_ARRVAL_P(parser->info),name,strlen(name) + 1,(void **) &element) == FAILURE) {
MAKE_STD_ZVAL(values);
- if (array_init(values) == FAILURE) {
- TSRMLS_FETCH();
-
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Unable to initialize array");
- return;
- }
+ array_init(values);
zend_hash_update(Z_ARRVAL_P(parser->info), name, strlen(name)+1, (void *) &values, sizeof(zval*), (void **) &element);
}