From ca347b0a9f5e3a3681ae24b36dd9df15b618260a Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 22 Oct 2014 10:27:19 +0200 Subject: [PATCH] os/KeyValueStore.cc: reduce scope of variables Signed-off-by: Danny Al-Gaaf --- src/os/KeyValueStore.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/KeyValueStore.cc b/src/os/KeyValueStore.cc index 59e9eb2b58551..71b61d3efc71b 100644 --- a/src/os/KeyValueStore.cc +++ b/src/os/KeyValueStore.cc @@ -177,13 +177,14 @@ int StripObjectMap::file_to_extents(uint64_t offset, size_t len, if (len == 0) return 0; - uint64_t start, end, strip_offset, extent_offset, extent_len; + uint64_t start, end, strip_offset; start = offset / strip_size; end = (offset + len) / strip_size; strip_offset = start * strip_size; // "offset" may in the middle of first strip object if (offset > strip_offset) { + uint64_t extent_offset, extent_len; extent_offset = offset - strip_offset; if (extent_offset + len <= strip_size) extent_len = len; -- 2.39.5