]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2811] Explicitly break out of loop after rebalancing tree
authorMukund Sivaraman <muks@isc.org>
Mon, 5 Aug 2013 05:38:20 +0000 (11:08 +0530)
committerMukund Sivaraman <muks@isc.org>
Mon, 5 Aug 2013 05:38:20 +0000 (11:08 +0530)
src/lib/datasrc/memory/domaintree.h

index 3c8db0b8463728d9fef5ec83a71ea58d9ec92607..5f413719037c4824f535ca8f8b78ac16e8b463a7 100644 (file)
@@ -2082,6 +2082,12 @@ DomainTree<T>::insertRebalance
             } else {
                 leftRotate(subtree_root, grandparent);
             }
+
+            // In this case, the tree is ready now and we explicitly
+            // break out of the loop here. Even if we continue the loop,
+            // it will exit the loop in case 2 above, but that's not so
+            // obvious.
+            break;
         }
     }