From: Radoslaw Zarzynski Date: Fri, 8 Mar 2019 15:45:12 +0000 (+0100) Subject: msg/async, v2: clean up ret handling in ProtocolV2::write(). X-Git-Tag: v14.2.0~23^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1fc1a293b803cecb47f15bee64237b190ad3a1c8;p=ceph.git msg/async, v2: clean up ret handling in ProtocolV2::write(). Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index 392ba038979..5c83ea24b94 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -735,12 +735,11 @@ CtPtr ProtocolV2::write(const std::string &desc, run_continuation(next); }); - if (r <= 0) { - if (r < 0) { - ldout(cct, 1) << __func__ << " " << desc << " write failed r=" << r - << " (" << cpp_strerror(r) << ")" << dendl; - return _fault(); - } + if (r < 0) { + ldout(cct, 1) << __func__ << " " << desc << " write failed r=" << r + << " (" << cpp_strerror(r) << ")" << dendl; + return _fault(); + } else if (r == 0) { next.setParams(); return &next; }