From 1f26ed767a0847ade757b24489b1b488eabbfee9 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Mon, 13 Apr 2015 15:59:36 -0700 Subject: [PATCH] Undo one fragment of 054e6826. 054e6826 got the condition wrong and strcmp saves a bunch of allocations. Change-Id: Iac7cbdd0b63747684c2f245868a7911c5f7eba57 --- tool/args.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/args.cc b/tool/args.cc index b7d704753..a1644767c 100644 --- a/tool/args.cc +++ b/tool/args.cc @@ -16,6 +16,7 @@ #include #include +#include #include "internal.h" @@ -29,7 +30,7 @@ bool ParseKeyValueArguments(std::map *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; }