Fix issue found by cppcheck:
[src/osdc/Objecter.cc:989] -> [src/osdc/Objecter.cc:992]: (performance)
Variable 'check_for_latest_map' is reassigned a value before the old
one has been used.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix it by declaring at the first real definition.
Signed-off-by: Greg Farnum <greg@inktank.com>
assert(client_inc >= 0);
// pick target
- bool check_for_latest_map = false;
num_homeless_ops++; // initially; recalc_op_target() will decrement if it finds a target
int r = recalc_op_target(op);
- check_for_latest_map = (r == RECALC_OP_TARGET_POOL_DNE);
+ bool check_for_latest_map = (r == RECALC_OP_TARGET_POOL_DNE);
// add to gather set(s)
if (op->onack) {