mirror of
https://github.com/ceph/ceph
synced 2024-12-29 15:03:33 +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)
|
if (vm.count("erased") > 0)
|
||||||
erased = vm["erased"].as<vector<int> >();
|
erased = vm["erased"].as<vector<int> >();
|
||||||
|
|
||||||
k = atoi(profile["k"].c_str());
|
k = stoi(profile["k"]);
|
||||||
m = atoi(profile["m"].c_str());
|
m = stoi(profile["m"]);
|
||||||
|
|
||||||
if (k <= 0) {
|
if (k <= 0) {
|
||||||
cout << "parameter k is " << k << ". But k needs to be > 0." << endl;
|
cout << "parameter k is " << k << ". But k needs to be > 0." << endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user