From 10a383c8059cd01f944d28af9266f22f696adb37 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 15 Jun 2017 16:10:47 +0800 Subject: [PATCH] mon/OSDMonitor: more assert() this helps with silencing the clang analyzer also. Signed-off-by: Kefu Chai --- src/mon/OSDMonitor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 1d2483ba7fceb..7ca4de82f603c 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -7090,7 +7090,7 @@ int OSDMonitor::prepare_command_osd_destroy( // defying PaxosService and all laws of nature. Therefore, as we may // be used during 'osd purge', let's keep the caller responsible for // proposing. - + assert(err == 0); return 0; } @@ -7146,8 +7146,8 @@ int OSDMonitor::prepare_command_osd_purge( } else { may_be_idempotent = false; } - assert(0 == err); } + assert(0 == err); if (may_be_idempotent && !osdmap.exists(id)) { dout(10) << __func__ << " osd." << id << " does not exist and " -- 2.39.5