]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PGLog.cc: reduce scope of variable
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 23 Oct 2014 17:49:30 +0000 (19:49 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sun, 26 Oct 2014 17:10:14 +0000 (18:10 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osd/PGLog.cc

index 96d1731389a63cdd07bcb8415984962a291e78d5..9a416c60f724547e1cfe54c3293d0db374f126fb 100644 (file)
@@ -939,14 +939,15 @@ void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid,
   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);
     ::decode(ondisklog_tail, bl);
     ::decode(ondisklog_head, bl);
-    if (struct_v >= 4)
+    if (struct_v >= 4) {
+      uint64_t ondisklog_zero_to;
       ::decode(ondisklog_zero_to, bl);
+    }
     if (struct_v >= 5)
       ::decode(divergent_priors, bl);
     DECODE_FINISH(bl);