r variable wasn't initialized but set to 0 twice. Once just before an early
"goto out" code and the other before the main code of the function.
This patch simply initialize r to 0 at the begining.
This make the code easier to read and prevent any future call to "out" label without a proper value stored in r.
Signed-off-by: Erwan Velu <erwan@redhat.com>
map<uint64_t,bluestore_extent_t>::iterator bp, bend;
map<uint64_t,bluestore_overlay_t>::iterator op, oend;
uint64_t block_size = bdev->get_block_size();
- int r;
+ int r = 0;
IOContext ioc(NULL); // FIXME?
// generally, don't buffer anything, unless the client explicitly requests
_dump_onode(o);
if (offset > o->onode.size) {
- r = 0;
goto out;
}
o->flush();
- r = 0;
-
// loop over overlays and data fragments. overlays take precedence.
bend = o->onode.block_map.end();
bp = o->onode.block_map.lower_bound(offset);