Skip to content

Commit

Permalink
Merge pull request sparklemotion#2387 from sparklemotion/flavorjones-…
Browse files Browse the repository at this point in the history
…remove-unnecessary-conditional

cleanup: remove unnecessary conditional
  • Loading branch information
flavorjones committed Dec 16, 2021
2 parents 2336758 + 1fafeb3 commit 66c15d9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ext/nokogiri/xml_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -1895,9 +1895,7 @@ in_context(VALUE self, VALUE _str, VALUE _options)
*/
child_iter = node->doc->children ;
while (child_iter) {
if (child_iter->parent != (xmlNodePtr)node->doc) {
child_iter->parent = (xmlNodePtr)node->doc;
}
child_iter->parent = (xmlNodePtr)node->doc;
child_iter = child_iter->next;
}

Expand Down

0 comments on commit 66c15d9

Please sign in to comment.