1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove redundant assignment on nodep->ns

It's already set by xmlSetNs().
This commit is contained in:
nielsdos
2023-06-05 21:56:10 +02:00
parent 8e0151707c
commit 6e04050474

View File

@@ -859,7 +859,6 @@ PHP_METHOD(DOMDocument, createElementNS)
zval *id;
xmlDocPtr docp;
xmlNodePtr nodep = NULL;
xmlNsPtr nsptr = NULL;
int ret;
size_t uri_len = 0, name_len = 0, value_len = 0;
char *uri, *name, *value = NULL;
@@ -880,7 +879,7 @@ PHP_METHOD(DOMDocument, createElementNS)
if (xmlValidateName((xmlChar *) localname, 0) == 0) {
nodep = xmlNewDocNode(docp, NULL, (xmlChar *) localname, (xmlChar *) value);
if (nodep != NULL && uri != NULL) {
nsptr = xmlSearchNsByHref(nodep->doc, nodep, (xmlChar *) uri);
xmlNsPtr nsptr = xmlSearchNsByHref(nodep->doc, nodep, (xmlChar *) uri);
if (nsptr == NULL) {
nsptr = dom_get_ns(nodep, uri, &errorcode, prefix);
}
@@ -908,9 +907,6 @@ PHP_METHOD(DOMDocument, createElementNS)
RETURN_FALSE;
}
nodep->ns = nsptr;
DOM_RET_OBJ(nodep, &ret, intern);
}
/* }}} end dom_document_create_element_ns */