From a58446c41aabb432d9824e75131e63c06c87a8bf Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Fri, 2 Jan 2015 18:36:21 +0100 Subject: [PATCH] tools/ceph_authtool.cc: reduce scope of some variables Signed-off-by: Danny Al-Gaaf --- src/tools/ceph_authtool.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/tools/ceph_authtool.cc b/src/tools/ceph_authtool.cc index 3cf07d691935a..fd3f73fb59166 100644 --- a/src/tools/ceph_authtool.cc +++ b/src/tools/ceph_authtool.cc @@ -55,15 +55,9 @@ int main(int argc, const char **argv) argv_to_vec(argc, argv, args); env_to_vec(args); - bool gen_key = false; - bool gen_print_key = false; std::string add_key; - bool list = false; - bool print_key = false; - bool create_keyring = false; std::string caps_fn; std::string import_keyring; - bool set_auid = false; uint64_t auid = CEPH_AUTH_UID_DEFAULT; map caps; std::string fn; @@ -71,7 +65,15 @@ int main(int argc, const char **argv) try { global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, CINIT_FLAG_NO_DEFAULT_CONFIG_FILE); + + bool gen_key = false; + bool gen_print_key = false; + bool list = false; + bool print_key = false; + bool create_keyring = false; + bool set_auid = false; std::vector::iterator i; + for (i = args.begin(); i != args.end(); ) { std::string val; if (ceph_argparse_double_dash(args, i)) { -- 2.39.5