Browse Source

[2811] Explicitly break out of loop after rebalancing tree

Mukund Sivaraman 12 years ago
parent
commit
07f6240583
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/lib/datasrc/memory/domaintree.h

+ 6 - 0
src/lib/datasrc/memory/domaintree.h

@@ -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;
         }
     }