From ebafa752161258f6e2d3079889d88ff08b6bba4a Mon Sep 17 00:00:00 2001 From: LiuBingrun Date: Wed, 22 Mar 2023 17:07:19 +0800 Subject: [PATCH] fix minor bug in rgw_admin the brackets after the "else if" is misplaced. Signed-off-by: LiuBingrun --- src/rgw/rgw_admin.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 7707b859ae5f2..8a1a68a376a57 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -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) { -- 2.39.5