From: Danny Al-Gaaf Date: Thu, 23 Oct 2014 17:55:55 +0000 (+0200) Subject: rgw/rgw_rest_user.cc: reduce scope of key_type X-Git-Tag: v0.88~22^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f446ea6c17c1375944a2ce33aa0fcb0c9ca793a;p=ceph.git rgw/rgw_rest_user.cc: reduce scope of key_type Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_rest_user.cc b/src/rgw/rgw_rest_user.cc index 6e88443d393..105c2924fdc 100644 --- a/src/rgw/rgw_rest_user.cc +++ b/src/rgw/rgw_rest_user.cc @@ -520,8 +520,6 @@ void RGWOp_Key_Remove::execute() std::string access_key; std::string key_type_str; - int32_t key_type = KEY_TYPE_UNDEFINED; - RGWUserAdminOpState op_state; RESTArgs::get_string(s, "uid", uid, &uid); @@ -540,6 +538,7 @@ void RGWOp_Key_Remove::execute() op_state.set_access_key(access_key); if (!key_type_str.empty()) { + int32_t key_type = KEY_TYPE_UNDEFINED; if (key_type_str.compare("swift") == 0) key_type = KEY_TYPE_SWIFT; else if (key_type_str.compare("s3") == 0)