mon/osdmonitor: initialize local variable "kb_avail_i"

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
xie xingguo 2016-07-15 16:08:33 +08:00
parent 898d25f892
commit 98f50cebe1

View File

@ -817,7 +817,7 @@ protected:
for (int k = osdmap->crush->get_bucket_size(id) - 1; k >= 0; k--) {
int item = osdmap->crush->get_bucket_item(id, k);
int64_t kb_i = 0, kb_used_i = 0, kb_avail_i;
int64_t kb_i = 0, kb_used_i = 0, kb_avail_i = 0;
if (!get_bucket_utilization(item, &kb_i, &kb_used_i, &kb_avail_i))
return false;
*kb += kb_i;