]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdmap: small cleanup
authorSage Weil <sage@newdream.net>
Thu, 5 May 2011 15:51:30 +0000 (08:51 -0700)
committerSage Weil <sage@newdream.net>
Thu, 5 May 2011 20:07:38 +0000 (13:07 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/OSDMap.h

index 744ba12458407ff7316497c7c0332a244e194d40..db5026ebf15f7508442a33079937ef6f8443eef8 100644 (file)
@@ -475,8 +475,7 @@ private:
   entity_inst_t get_inst(int osd) {
     assert(exists(osd));
     assert(is_up(osd));
-    return entity_inst_t(entity_name_t::OSD(osd),
-                        osd_addr[osd]);
+    return entity_inst_t(entity_name_t::OSD(osd), osd_addr[osd]);
   }
   entity_inst_t get_cluster_inst(int osd) {
     assert(exists(osd));
@@ -487,9 +486,8 @@ private:
   }
   entity_inst_t get_hb_inst(int osd) {
     assert(exists(osd));
-    entity_inst_t i(entity_name_t::OSD(osd),
-                   osd_hb_addr[osd]);
-    return i;
+    assert(is_up(osd));
+    return entity_inst_t(entity_name_t::OSD(osd), osd_hb_addr[osd]);
   }
 
   const epoch_t& get_up_from(int osd) const {