]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd_types: typo in object_info_t::decode for struct_v==6
authorSamuel Just <sam.just@inktank.com>
Tue, 25 Sep 2012 21:07:45 +0000 (14:07 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 25 Sep 2012 21:09:32 +0000 (14:09 -0700)
hoid.hash is uninitialized, and should not be used to
initialize hoid.hash.

CID 717200: Uninitialized scalar variable (UNINIT)At (9): Using uninitialized
value "hoid.hash" when calling "hobject_t::hobject_t(object_t, std::string
const &, snapid_t, uint64_t, int64_t)".

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/osd_types.cc

index a981d02f9006f642c4ba423998b98fcd5fee5e29..0fa208d75f9cebc080738fc30bbc493b3ab173b6 100644 (file)
@@ -2271,7 +2271,7 @@ void object_info_t::decode(bufferlist::iterator& bl)
     ::decode(soid, bl);
     ::decode(oloc, bl);
     if (struct_v == 6) {
-      hobject_t hoid(soid.oid, oloc.key, soid.snap, hoid.hash, 0);
+      hobject_t hoid(soid.oid, oloc.key, soid.snap, soid.hash, 0);
       soid = hoid;
     }
   }