Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-04-14 01:59:36 +0300
committerAdam Langley <agl@google.com>2015-04-14 01:59:36 +0300
commit1f26ed767a0847ade757b24489b1b488eabbfee9 (patch)
tree89321848adfc2719d446d06e59fa245820a214ae /tool/args.cc
parentb16346b0ada83c2a7ecddc8aed790ce81b00f993 (diff)
Undo one fragment of 054e6826.
054e6826 got the condition wrong and strcmp saves a bunch of allocations. Change-Id: Iac7cbdd0b63747684c2f245868a7911c5f7eba57
Diffstat (limited to 'tool/args.cc')
-rw-r--r--tool/args.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/args.cc b/tool/args.cc
index b7d70475..a1644767 100644
--- a/tool/args.cc
+++ b/tool/args.cc
@@ -16,6 +16,7 @@
#include <vector>
#include <stdio.h>
+#include <string.h>
#include "internal.h"
@@ -29,7 +30,7 @@ bool ParseKeyValueArguments(std::map<std::string, std::string> *out_args,
const std::string &arg = args[i];
const struct argument *templ = nullptr;
for (size_t j = 0; templates[j].name[0] != 0; j++) {
- if (arg != std::string(templates[j].name)) {
+ if (strcmp(arg.c_str(), templates[j].name) == 0) {
templ = &templates[j];
break;
}