mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
tests: use stoi() instead of atoi()
stoi() is simpler if we need to convert std::string to integer. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
d143450450
commit
83762041a4
@ -122,8 +122,8 @@ int ErasureCodeBench::setup(int argc, char** argv) {
|
||||
if (vm.count("erased") > 0)
|
||||
erased = vm["erased"].as<vector<int> >();
|
||||
|
||||
k = atoi(profile["k"].c_str());
|
||||
m = atoi(profile["m"].c_str());
|
||||
k = stoi(profile["k"]);
|
||||
m = stoi(profile["m"]);
|
||||
|
||||
if (k <= 0) {
|
||||
cout << "parameter k is " << k << ". But k needs to be > 0." << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user