From: Wei Jin Date: Sun, 3 Apr 2016 06:20:16 +0000 (+0800) Subject: osdmap: rm nonused variable X-Git-Tag: v10.1.1~19^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F8423%2Fhead;p=ceph.git osdmap: rm nonused variable Signed-off-by: Wei Jin --- diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index 37986527af7..3d06df65b32 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -2641,7 +2641,7 @@ int OSDMap::build_simple(CephContext *cct, epoch_t e, uuid_d &fsid, set_max_osd(nosd); } else { // count osds - int maxosd = 0, numosd = 0; + int maxosd = 0; const md_config_t *conf = cct->_conf; vector sections; conf->get_all_sections(sections); @@ -2659,7 +2659,7 @@ int OSDMap::build_simple(CephContext *cct, epoch_t e, uuid_d &fsid, lderr(cct) << "[osd." << o << "] in config has id > mon_max_osd " << cct->_conf->mon_max_osd << dendl; return -ERANGE; } - numosd++; + if (o > maxosd) maxosd = o; }