]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
iputils.hh: Rename parent to pparent
authorAki Tuomi <cmouse@cmouse.fi>
Mon, 21 Oct 2019 09:10:37 +0000 (12:10 +0300)
committerAki Tuomi <cmouse@cmouse.fi>
Tue, 29 Oct 2019 10:03:20 +0000 (12:03 +0200)
iputils.hh:785:32: warning: declaration of 'parent' shadows a global declaration

pdns/iputils.hh

index d0b01adddb47be1f3e0b19e0a189cc1869d07554..c5d978b343b09423dc76620de62f16cc3d60816e 100644 (file)
@@ -782,15 +782,15 @@ public:
     // only cleanup this node if it has no children and node4 and node6 are both empty
     if (!(node->left || node->right || node->node6 || node->node4)) {
       // get parent node ptr
-      TreeNode* parent = node->parent;
+      TreeNode* pparent = node->parent;
       // delete this node
-      if (parent) {
-       if (parent->left.get() == node)
-         parent->left.reset();
+      if (pparent) {
+       if (pparent->left.get() == node)
+         pparent->left.reset();
        else
-         parent->right.reset();
+         pparent->right.reset();
        // now recurse up to the parent
-       cleanup_tree(parent);
+       cleanup_tree(pparent);
       }
     }
   }