]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper: fix _search_item_exists
authorSage Weil <sage@redhat.com>
Sat, 22 Nov 2014 01:37:03 +0000 (17:37 -0800)
committerSage Weil <sage@redhat.com>
Tue, 9 Dec 2014 00:21:24 +0000 (16:21 -0800)
Reported-by: Pawel Sadowski <ceph@sadziu.pl>
Signed-off-by: Sage Weil <sage@redhat.com>
src/crush/CrushWrapper.cc

index 20a722a0941d73e1d86f8fc9a05f86a56a9f80e3..dd05b11c0efc0c6e9adf5f1241e4768533670ff1 100644 (file)
@@ -235,8 +235,8 @@ bool CrushWrapper::_search_item_exists(int item) const
     if (!crush->buckets[i])
       continue;
     crush_bucket *b = crush->buckets[i];
-    for (unsigned i=0; i<b->size; ++i) {
-      if (b->items[i] == item)
+    for (unsigned j=0; j<b->size; ++j) {
+      if (b->items[j] == item)
        return true;
     }
   }