]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon_store_converter.cc: move convert() call out of assert()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 23 Oct 2014 17:56:47 +0000 (19:56 +0200)
committerSage Weil <sage@redhat.com>
Mon, 27 Oct 2014 19:44:25 +0000 (12:44 -0700)
The convert() call is changing data. To prevent Heisenbugs
depending in NDEBUG definition (e.g. if debug is off).

Move convert() call out of the assert call and use assert
only on the result value of the call.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/tools/mon_store_converter.cc

index 7b8add8cd0627e94c09e3ed91ac2b2b189f1ef5d..59b3265dd8555cf80f17a38e987af2751fe98ef6 100644 (file)
@@ -325,7 +325,8 @@ int main(int argc, const char *argv[])
   string store(args[0]);
   string new_store(store);
   MonitorStoreConverter converter(store, new_store);
-  assert(!converter.convert());
+  int ret = converter.convert();
+  assert(!ret);
   assert(converter.match());
 
   std::cout << "store successfully converted to new format" << std::endl;