]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_user.cc: reduce scope of variable 185/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 2 Apr 2013 15:01:07 +0000 (17:01 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 2 Apr 2013 15:01:07 +0000 (17:01 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_user.cc

index 8166385e28c9eef9939d0148aa6cc7d2f37a0b94..d094ff915f6bced200c8c459f63754e410eabf03 100644 (file)
@@ -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) {