]> 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)
committerKefu Chai <kchai@redhat.com>
Tue, 22 Nov 2016 03:47:00 +0000 (11:47 +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>
(cherry picked from commit 6a1c01d334fe65124043aa68a6e0cfaea43836b5)

src/tools/rebuild_mondb.cc

index 1c0effeac3cc478f62319d1e6bb7af971470e287..af3532cb569756edc6aef7e0ba941787d9f2c74f 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;