Commit 122b967d authored by Hannes Roth's avatar Hannes Roth Committed by Dave Watson

(Folly) Fix error when compiling with clang

Summary:
folly/Benchmark.cpp:427:9: error: logical not is only applied to the left hand side of this comparison
if (!strcmp(get<1>(benchmarks[i]), "-") == 0) {

Since the `!` binds to `strcmp`, removing both the `!` and the `== 0`
should be equivalent.

Reviewers of diff that introduced this line: D490324

Test Plan: I compiled `tao/client` with/without this diff.

Reviewed By: delong.j@fb.com

FB internal diff: D1196452

Blame Revision: rFBCODE6f5eea5fcd23044a5c579b040bf45d17006b4adf
parent e3225b60
......@@ -424,7 +424,7 @@ void runBenchmarks() {
get<2>(benchmarks.front()), 0);
FOR_EACH_RANGE (i, 1, benchmarks.size()) {
double elapsed = 0.0;
if (!strcmp(get<1>(benchmarks[i]), "-") == 0) { // skip separators
if (strcmp(get<1>(benchmarks[i]), "-")) { // skip separators
if (bmRegex && !boost::regex_search(get<1>(benchmarks[i]), *bmRegex)) {
continue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment