]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: more assert() 15704/head
authorKefu Chai <kchai@redhat.com>
Thu, 15 Jun 2017 08:10:47 +0000 (16:10 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 15 Jun 2017 08:10:51 +0000 (16:10 +0800)
this helps with silencing the clang analyzer also.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/OSDMonitor.cc

index 1d2483ba7fcebbe39072034caedd31c1f4c0d2ec..7ca4de82f603c88a225b372adc561d28363a50cb 100644 (file)
@@ -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 "