Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu committed Sep 30, 2021
1 parent 1f4a227 commit 4e29768
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/memory/test/SysInfoReadBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ BENCHMARK(Popen) {
std::cerr << ::strerror(errno);
}
uint64_t value = 0;
fscanf(pipe, "%lu", &value);
if (fscanf(pipe, "%lu", &value) != 2) {
std::cerr << ::strerror(errno);
}
if (pclose(pipe) < 0) {
std::cerr << ::strerror(errno);
}
Expand Down

0 comments on commit 4e29768

Please sign in to comment.