From: Danny Al-Gaaf Date: Tue, 2 Apr 2013 15:01:07 +0000 (+0200) Subject: rgw/rgw_user.cc: reduce scope of variable X-Git-Tag: v0.62~102^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F185%2Fhead;p=ceph.git rgw/rgw_user.cc: reduce scope of variable Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index 8166385e28c9..d094ff915f6b 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) {