Check ENVs and return diretly if they doesn't exist before spliting
args.
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
if (!name)
name = "CEPH_ARGS";
- auto [options, arguments] = split_dashdash(args);
-
/*
* We can only populate str_vec once. Other threads could hold pointers into
* it, so clearing it out and replacing it is not currently safe.
g_str_vec_lock.unlock();
auto [env_options, env_arguments] = split_dashdash(env);
+ auto [options, arguments] = split_dashdash(args);
args.clear();
args.insert(args.end(), env_options.begin(), env_options.end());
args.insert(args.end(), options.begin(), options.end());