From 92d43dabbd22e9d0347caf247d7f8262ce882dc5 Mon Sep 17 00:00:00 2001 From: Changcheng Liu Date: Wed, 26 Aug 2020 14:22:10 +0800 Subject: [PATCH] crush/CrushWrapper: use "new_bucket_id" as var name of the added bucket Signed-off-by: Changcheng Liu --- src/crush/CrushWrapper.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index 355311dbd95..7ff81215fce 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -1143,17 +1143,17 @@ int CrushWrapper::insert_item( if (!name_exists(q->second)) { ldout(cct, 5) << "insert_item creating bucket " << q->second << dendl; - int zero_weight = 0, newid; + int zero_weight = 0, new_bucket_id; int r = add_bucket(0, 0, - CRUSH_HASH_DEFAULT, p->first, 1, &cur, &zero_weight, &newid); + CRUSH_HASH_DEFAULT, p->first, 1, &cur, &zero_weight, &new_bucket_id); if (r < 0) { ldout(cct, 1) << "add_bucket failure error: " << cpp_strerror(r) << dendl; return r; } - set_item_name(newid, q->second); + set_item_name(new_bucket_id, q->second); - cur = newid; + cur = new_bucket_id; continue; } -- 2.47.3