mirror of https://github.com/google/benchmark.git
* 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>
|
Kaito Udagawa <umireon@gmail.com>
|
||||||
Lei Xu <eddyxu@gmail.com>
|
Lei Xu <eddyxu@gmail.com>
|
||||||
Matt Clarkson <mattyclarkson@gmail.com>
|
Matt Clarkson <mattyclarkson@gmail.com>
|
||||||
|
Maxim Vafin <maxvafin@gmail.com>
|
||||||
Nick Hutchinson <nshutchinson@gmail.com>
|
Nick Hutchinson <nshutchinson@gmail.com>
|
||||||
Oleksandr Sochka <sasha.sochka@gmail.com>
|
Oleksandr Sochka <sasha.sochka@gmail.com>
|
||||||
Paul Redmond <paul.redmond@gmail.com>
|
Paul Redmond <paul.redmond@gmail.com>
|
||||||
|
|
|
@ -41,6 +41,7 @@ Kaito Udagawa <umireon@gmail.com>
|
||||||
Kai Wolf <kai.wolf@gmail.com>
|
Kai Wolf <kai.wolf@gmail.com>
|
||||||
Lei Xu <eddyxu@gmail.com>
|
Lei Xu <eddyxu@gmail.com>
|
||||||
Matt Clarkson <mattyclarkson@gmail.com>
|
Matt Clarkson <mattyclarkson@gmail.com>
|
||||||
|
Maxim Vafin <maxvafin@gmail.com>
|
||||||
Nick Hutchinson <nshutchinson@gmail.com>
|
Nick Hutchinson <nshutchinson@gmail.com>
|
||||||
Oleksandr Sochka <sasha.sochka@gmail.com>
|
Oleksandr Sochka <sasha.sochka@gmail.com>
|
||||||
Pascal Leroy <phl@google.com>
|
Pascal Leroy <phl@google.com>
|
||||||
|
|
|
@ -75,7 +75,9 @@ bool ReadIntFromFile(const char* file, long* value) {
|
||||||
char line[1024];
|
char line[1024];
|
||||||
char* err;
|
char* err;
|
||||||
memset(line, '\0', sizeof(line));
|
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);
|
const long temp_value = strtol(line, &err, 10);
|
||||||
if (line[0] != '\0' && (*err == '\n' || *err == '\0')) {
|
if (line[0] != '\0' && (*err == '\n' || *err == '\0')) {
|
||||||
*value = temp_value;
|
*value = temp_value;
|
||||||
|
|
Loading…
Reference in New Issue