From 80eaa127b85e20660d3657758108f1907820353f Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 1 Mar 2017 15:21:51 +0000 Subject: [PATCH] osd: update for mon_command void change Signed-off-by: John Spray --- src/osd/OSD.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index e2135a0902c2e..48b73bf50553a 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3039,9 +3039,8 @@ int OSD::update_crush_location() bufferlist inbl; C_SaferCond w; string outs; - int r = monc->start_mon_command(vcmd, inbl, NULL, &outs, &w); - if (r == 0) - r = w.wait(); + monc->start_mon_command(vcmd, inbl, NULL, &outs, &w); + int r = w.wait(); if (r < 0) { if (r == -ENOENT && !created) { string newcmd = "{\"prefix\": \"osd create\", \"id\": " + stringify(whoami) @@ -3050,9 +3049,8 @@ int OSD::update_crush_location() bufferlist inbl; C_SaferCond w; string outs; - int r = monc->start_mon_command(vnewcmd, inbl, NULL, &outs, &w); - if (r == 0) - r = w.wait(); + monc->start_mon_command(vnewcmd, inbl, NULL, &outs, &w); + int r = w.wait(); if (r < 0) { derr << __func__ << " fail: osd does not exist and created failed: " << cpp_strerror(r) << dendl; -- 2.39.5