From: Danny Al-Gaaf Date: Wed, 31 Jul 2013 22:34:41 +0000 (+0200) Subject: rgw_rados.cc: fix invalid iterator comparison X-Git-Tag: v0.67~20^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F476%2Fhead;p=ceph.git rgw_rados.cc: fix invalid iterator comparison The iterator should be compared against the end() function of the same iter() from region_conn_map. CID 1058791 (#1 of 1): Invalid iterator comparison (MISMATCHED_ITERATOR) mismatched_comparison: Comparing "iter" from "this->region_conn_map" to "this->zone_conn_map.end()" from "this->zone_conn_map". Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index aba5cdf0ee2..222b79a7d2e 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2551,7 +2551,7 @@ int RGWRados::copy_obj(void *ctx, conn = rest_master_conn; } else { map::iterator iter = region_conn_map.find(src_bucket_info.region); - if (iter == zone_conn_map.end()) { + if (iter == region_conn_map.end()) { ldout(cct, 0) << "could not find region connection to region: " << source_zone << dendl; return -ENOENT; }