Skip to content

Commit 6e04050

Browse files
committed
Remove redundant assignment on nodep->ns
It's already set by xmlSetNs().
1 parent 8e01517 commit 6e04050

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ext/dom/document.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,6 @@ PHP_METHOD(DOMDocument, createElementNS)
859859
zval *id;
860860
xmlDocPtr docp;
861861
xmlNodePtr nodep = NULL;
862-
xmlNsPtr nsptr = NULL;
863862
int ret;
864863
size_t uri_len = 0, name_len = 0, value_len = 0;
865864
char *uri, *name, *value = NULL;
@@ -880,7 +879,7 @@ PHP_METHOD(DOMDocument, createElementNS)
880879
if (xmlValidateName((xmlChar *) localname, 0) == 0) {
881880
nodep = xmlNewDocNode(docp, NULL, (xmlChar *) localname, (xmlChar *) value);
882881
if (nodep != NULL && uri != NULL) {
883-
nsptr = xmlSearchNsByHref(nodep->doc, nodep, (xmlChar *) uri);
882+
xmlNsPtr nsptr = xmlSearchNsByHref(nodep->doc, nodep, (xmlChar *) uri);
884883
if (nsptr == NULL) {
885884
nsptr = dom_get_ns(nodep, uri, &errorcode, prefix);
886885
}
@@ -908,9 +907,6 @@ PHP_METHOD(DOMDocument, createElementNS)
908907
RETURN_FALSE;
909908
}
910909

911-
912-
nodep->ns = nsptr;
913-
914910
DOM_RET_OBJ(nodep, &ret, intern);
915911
}
916912
/* }}} end dom_document_create_element_ns */

0 commit comments

Comments
 (0)