]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_user.cc: reduce scope of same_email in execute_modify()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 2 Apr 2013 14:15:27 +0000 (16:15 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 2 Apr 2013 14:15:27 +0000 (16:15 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_user.cc

index dd3990ac652a33fb0827141439a3a157b950b5c6..7ba9ae3c3f04a12343e3e9d4c51efbb18520ce0f 100644 (file)
@@ -1752,7 +1752,6 @@ int RGWUser::remove(RGWUserAdminOpState& op_state, std::string *err_msg)
 
 int RGWUser::execute_modify(RGWUserAdminOpState& op_state, std::string *err_msg)
 {
-  bool same_email = false;
   bool populated = op_state.is_populated();
   bool defer_user_update = true;
   int ret = 0;
@@ -1787,6 +1786,7 @@ 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()) {
     same_email = (old_email.compare(op_email) == 0);