From b99b8cc8a295a10c6cc1649fd4e597a6a3cab4cf Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 2 Apr 2013 17:01:07 +0200 Subject: [PATCH] rgw/rgw_user.cc: reduce scope of variable Signed-off-by: Danny Al-Gaaf --- src/rgw/rgw_user.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index 8166385e28c9e..d094ff915f6bc 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -1785,11 +1785,11 @@ int RGWUser::execute_modify(RGWUserAdminOpState& op_state, std::string *err_msg) user_info = old_info; std::string old_email = old_info.user_email; - bool same_email = false; if (!op_email.empty()) { + bool same_email = false; same_email = (old_email.compare(op_email) == 0); - // make sure we are not adding a duplicate email + // make sure we are not adding a duplicate email if (!same_email) { ret = rgw_get_user_info_by_email(store, op_email, duplicate_check); if (ret >= 0 && duplicate_check.user_id != user_id) { -- 2.39.5