From 7f446ea6c17c1375944a2ce33aa0fcb0c9ca793a Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Thu, 23 Oct 2014 19:55:55 +0200 Subject: [PATCH] rgw/rgw_rest_user.cc: reduce scope of key_type Signed-off-by: Danny Al-Gaaf --- src/rgw/rgw_rest_user.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) -- 2.47.3