summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_token.cc
diff options
context:
space:
mode:
authorRonen Friedman <rfriedma@redhat.com>2021-08-19 14:55:24 +0200
committerRonen Friedman <rfriedma@redhat.com>2021-08-19 15:40:48 +0200
commit2d4c360a4ab82fd11aee16e7b77fbf2ea560a353 (patch)
treee3da0100f7aca176ee8cf5c159a919b9221ea4b3 /src/rgw/rgw_token.cc
parentcommon: improve argv_to_vec() to accept both const and non-const argv (diff)
downloadceph-2d4c360a4ab82fd11aee16e7b77fbf2ea560a353.tar.xz
ceph-2d4c360a4ab82fd11aee16e7b77fbf2ea560a353.zip
common: modify 'main()s' to use new argv_to_vec() signature
A followup to PR #42820 that modified argv_to_vec() signature (for style and performance). Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Diffstat (limited to 'src/rgw/rgw_token.cc')
-rw-r--r--src/rgw/rgw_token.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rgw/rgw_token.cc b/src/rgw/rgw_token.cc
index aaa4f47ca2c..0d58671dbf2 100644
--- a/src/rgw/rgw_token.cc
+++ b/src/rgw/rgw_token.cc
@@ -62,9 +62,8 @@ void usage()
int main(int argc, char **argv)
{
+ auto args = argv_to_vec(argc, argv);
std::string val;
- vector<const char*> args;
- argv_to_vec(argc, (const char **)argv, args);
if (args.empty()) {
cerr << argv[0] << ": -h or --help for usage" << std::endl;
exit(1);
@@ -74,7 +73,7 @@ int main(int argc, char **argv)
exit(0);
}
- auto cct = global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT,
+ auto cct = global_init(nullptr, args, CEPH_ENTITY_TYPE_CLIENT,
CODE_ENVIRONMENT_UTILITY, 0);
common_init_finish(g_ceph_context);