From: Danny Al-Gaaf Date: Wed, 22 Oct 2014 08:44:13 +0000 (+0200) Subject: osd/PGLog.cc: reduce scope of variable, remove not needed code X-Git-Tag: v0.88~22^2~32 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f4de4375b987bc4bedcc467d85a2fa924425c2d5;p=ceph.git osd/PGLog.cc: reduce scope of variable, remove not needed code Signed-off-by: Danny Al-Gaaf --- diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index 60390a2a5962f..96d1731389a63 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -934,12 +934,12 @@ void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid, // load bounds, based on old OndiskLog encoding. uint64_t ondisklog_tail = 0; uint64_t ondisklog_head = 0; - uint64_t ondisklog_zero_to; bool ondisklog_has_checksums; bufferlist blb; store->collection_getattr(coll, "ondisklog", blb); { + uint64_t ondisklog_zero_to; bufferlist::iterator bl = blb.begin(); DECODE_START_LEGACY_COMPAT_LEN(3, 3, 3, bl); ondisklog_has_checksums = (struct_v >= 2); @@ -947,8 +947,6 @@ void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid, ::decode(ondisklog_head, bl); if (struct_v >= 4) ::decode(ondisklog_zero_to, bl); - else - ondisklog_zero_to = 0; if (struct_v >= 5) ::decode(divergent_priors, bl); DECODE_FINISH(bl);