From: Danny Al-Gaaf Date: Tue, 21 Feb 2017 15:24:06 +0000 (+0100) Subject: PrimaryLogPG.cc: use static_cast instead of c-style X-Git-Tag: v12.0.2~116^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1a4720e95acaed05054392d524e8b431057ab03a;p=ceph.git PrimaryLogPG.cc: use static_cast instead of c-style Signed-off-by: Danny Al-Gaaf --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 86bf86315a58..2f1599963c92 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -1533,7 +1533,7 @@ void PrimaryLogPG::get_src_oloc(const object_t& oid, const object_locator_t& olo void PrimaryLogPG::handle_backoff(OpRequestRef& op) { const MOSDBackoff *m = static_cast(op->get_req()); - SessionRef session((Session *)m->get_connection()->get_priv()); + SessionRef session = static_cast(m->get_connection()->get_priv()); if (!session) return; // drop it. session->put(); // get_priv takes a ref, and so does the SessionRef @@ -1579,7 +1579,7 @@ void PrimaryLogPG::do_request( // pg-wide backoffs const Message *m = op->get_req(); if (m->get_connection()->has_feature(CEPH_FEATURE_RADOS_BACKOFF)) { - SessionRef session((Session *)m->get_connection()->get_priv()); + SessionRef session = static_cast(m->get_connection()->get_priv()); if (!session) return; // drop it. session->put(); // get_priv takes a ref, and so does the SessionRef @@ -1779,7 +1779,7 @@ void PrimaryLogPG::do_op(OpRequestRef& op) m->get_connection()->has_feature(CEPH_FEATURE_RADOS_BACKOFF); SessionRef session; if (can_backoff) { - session = ((Session *)m->get_connection()->get_priv()); + session = static_cast(m->get_connection()->get_priv()); if (!session.get()) { dout(10) << __func__ << " no session" << dendl; return;