mirror of
https://github.com/google/benchmark.git
synced 2024-12-26 12:30:14 +08:00
* Fix reading CPU info from file Macro CHECK do nothing for release mode, meaning it doesn't invoke the arguments * Add myself to AUTHORS and CONTRIBUTORS
This commit is contained in:
parent
94c512c043
commit
ec15860da5
1
AUTHORS
1
AUTHORS
@ -25,6 +25,7 @@ Jussi Knuuttila <jussi.knuuttila@gmail.com>
|
||||
Kaito Udagawa <umireon@gmail.com>
|
||||
Lei Xu <eddyxu@gmail.com>
|
||||
Matt Clarkson <mattyclarkson@gmail.com>
|
||||
Maxim Vafin <maxvafin@gmail.com>
|
||||
Nick Hutchinson <nshutchinson@gmail.com>
|
||||
Oleksandr Sochka <sasha.sochka@gmail.com>
|
||||
Paul Redmond <paul.redmond@gmail.com>
|
||||
|
@ -41,6 +41,7 @@ Kaito Udagawa <umireon@gmail.com>
|
||||
Kai Wolf <kai.wolf@gmail.com>
|
||||
Lei Xu <eddyxu@gmail.com>
|
||||
Matt Clarkson <mattyclarkson@gmail.com>
|
||||
Maxim Vafin <maxvafin@gmail.com>
|
||||
Nick Hutchinson <nshutchinson@gmail.com>
|
||||
Oleksandr Sochka <sasha.sochka@gmail.com>
|
||||
Pascal Leroy <phl@google.com>
|
||||
|
@ -75,7 +75,9 @@ bool ReadIntFromFile(const char* file, long* value) {
|
||||
char line[1024];
|
||||
char* err;
|
||||
memset(line, '\0', sizeof(line));
|
||||
CHECK(read(fd, line, sizeof(line) - 1));
|
||||
ssize_t read_err = read(fd, line, sizeof(line) - 1);
|
||||
((void)read_err); // prevent unused warning
|
||||
CHECK(read_err >= 0);
|
||||
const long temp_value = strtol(line, &err, 10);
|
||||
if (line[0] != '\0' && (*err == '\n' || *err == '\0')) {
|
||||
*value = temp_value;
|
||||
|
Loading…
Reference in New Issue
Block a user