From 09701269de225e556099b9e5c511faa44acae024 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Sun, 18 Sep 2016 10:33:56 +0800 Subject: [PATCH] tools/rebuild_mondb: avoid unnecessary result code cast In general we return negative codes for error cases, so there is no need perform the cast here. Signed-off-by: xie xingguo (cherry picked from commit 6a1c01d334fe65124043aa68a6e0cfaea43836b5) --- src/tools/rebuild_mondb.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rebuild_mondb.cc b/src/tools/rebuild_mondb.cc index a52577d6a35c..a8d36ec0f02d 100644 --- a/src/tools/rebuild_mondb.cc +++ b/src/tools/rebuild_mondb.cc @@ -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; -- 2.47.3