diff --git a/mace/core/runtime/cpu/cpu_runtime.cc b/mace/core/runtime/cpu/cpu_runtime.cc index 67215b8dd430ff05d013f2d71c4e6fc7f1533d7e..f9baac6e6cf528e3bf58f779ead99ab8bca18db0 100644 --- a/mace/core/runtime/cpu/cpu_runtime.cc +++ b/mace/core/runtime/cpu/cpu_runtime.cc @@ -84,7 +84,7 @@ int GetCPUMaxFreq(std::vector *max_freqs) { } std::string line; if (std::getline(f, line)) { - float freq = atof(line.c_str()); + float freq = strtof(line.c_str(), nullptr); max_freqs->push_back(freq); } if (f.bad()) {