folly HHWheelTimer: fix loop variable
authorSteve O'Brien <steveo@fb.com>
Fri, 17 Jul 2015 19:41:02 +0000 (12:41 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 20 Jul 2015 19:26:31 +0000 (12:26 -0700)
Summary: In nested loop, loop condition is incorrect.  Fixed var (should be `ii` not `i`)

Reviewed By: @pgriess

Differential Revision: D2255702

folly/io/async/HHWheelTimer.cpp

index 2bc9eae772c3054b8aaf0f4151db1fdb50b7e582..366b5eeb7a47e0f00f5bd91c8707d1e07671334f 100644 (file)
@@ -212,7 +212,7 @@ size_t HHWheelTimer::cancelAll() {
 // http://llvm.org/bugs/show_bug.cgi?id=22106
 #if FOLLY_USE_LIBCPP
   for (size_t i = 0; i < WHEEL_BUCKETS; ++i) {
-    for (size_t ii = 0; i < WHEEL_SIZE; ++ii) {
+    for (size_t ii = 0; ii < WHEEL_SIZE; ++ii) {
       std::swap(buckets_[i][ii], buckets[i][ii]);
     }
   }