]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/rebuild_mondb: avoid unnecessary result code cast
authorxie xingguo <xie.xingguo@zte.com.cn>
Sun, 18 Sep 2016 02:33:56 +0000 (10:33 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sun, 18 Sep 2016 03:42:31 +0000 (11:42 +0800)
In general we return negative codes for error cases, so there is
no need perform the cast here.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/tools/rebuild_mondb.cc

index a52577d6a35c992ae13f0f60579ba4bce2e3652b..a8d36ec0f02ded3b1ced83d853faae2fa4aae2cf 100644 (file)
@@ -22,7 +22,7 @@ int update_mon_db(ObjectStore& fs, OSDSuperblock& sb,
   int r = ms.create_and_open(cerr);
   if (r < 0) {
     cerr << "unable to open mon store: " << store_path << std::endl;
-    return EINVAL;
+    return r;
   }
   if ((r = update_auth(keyring, sb, ms)) < 0) {
     goto out;