Commit 3bdf4553 authored by Michael Karcher's avatar Michael Karcher Committed by Alexandre Julliard

msxml3: Simplify IXMLDOMNode::removeChild.

parent 30351482
......@@ -620,8 +620,6 @@ static HRESULT WINAPI xmlnode_removeChild(
{
xmlnode *This = impl_from_IXMLDOMNode( iface );
xmlNode *child_node_ptr;
HRESULT hr;
IXMLDOMNode *child;
TRACE("%p->(%p, %p)\n", This, childNode, oldChild);
......@@ -630,22 +628,15 @@ static HRESULT WINAPI xmlnode_removeChild(
if(oldChild)
*oldChild = NULL;
hr = IXMLDOMNode_QueryInterface(childNode, &IID_IXMLDOMNode, (LPVOID)&child);
if(FAILED(hr))
return hr;
child_node_ptr = impl_from_IXMLDOMNode(child)->node;
child_node_ptr = impl_from_IXMLDOMNode(childNode)->node;
if(child_node_ptr->parent != This->node)
{
WARN("childNode %p is not a child of %p\n", childNode, iface);
IXMLDOMNode_Release(child);
return E_INVALIDARG;
}
xmlUnlinkNode(child_node_ptr);
IXMLDOMNode_Release(child);
if(oldChild)
{
IXMLDOMNode_AddRef(childNode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment