]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
fix minor bug in rgw_admin
authorLiuBingrun <liubr1@chinatelecom.cn>
Wed, 22 Mar 2023 09:07:19 +0000 (17:07 +0800)
committerGitHub <noreply@github.com>
Wed, 22 Mar 2023 09:07:19 +0000 (17:07 +0800)
the brackets after the "else if" is misplaced.

Signed-off-by: LiuBingrun <liubr1@chinatelecom.cn>
src/rgw/rgw_admin.cc

index 7707b859ae5f20a0e51df4a376bc69eac663452b..8a1a68a376a5762ef67bbb9cedd381f3d579da67 100644 (file)
@@ -10108,7 +10108,7 @@ next:
                            have_max_read_ops, have_max_write_ops,
                            have_max_read_bytes, have_max_write_bytes);
     } else if (!rgw::sal::User::empty(user)) {
-      if (ratelimit_scope == "user") {
+      if (ratelimit_scope == "user") {
         return set_user_ratelimit(opt_cmd, user, max_read_ops, max_write_ops,
                          max_read_bytes, max_write_bytes,
                          have_max_read_ops, have_max_write_ops,
@@ -10117,6 +10117,7 @@ next:
         cerr << "ERROR: invalid ratelimit scope specification. Please specify either --ratelimit-scope=bucket, or --ratelimit-scope=user" << std::endl;
         return EINVAL;
       }
+    }
   }
 
   if (ratelimit_op_get) {
@@ -10132,12 +10133,13 @@ next:
       }
       return show_bucket_ratelimit(driver, tenant, bucket_name, formatter.get());
     } else if (!rgw::sal::User::empty(user)) {
-      if (ratelimit_scope == "user") {
+      if (ratelimit_scope == "user") {
         return show_user_ratelimit(user, formatter.get());
       } else {
         cerr << "ERROR: invalid ratelimit scope specification. Please specify either --ratelimit-scope=bucket, or --ratelimit-scope=user" << std::endl;
         return EINVAL;
       }
+    }
   }
 
   if (opt_cmd == OPT::MFA_CREATE) {