Commit c2a5ab10 authored by dougk's avatar dougk Committed by Commit bot

Follow-up to https://codereview.chromium.org/938853002

Address comments of RCH

BUG=none

Review URL: https://codereview.chromium.org/934383002

Cr-Commit-Position: refs/heads/master@{#316945}
parent d5b91fc6
...@@ -48,10 +48,7 @@ int main(int argc, char *argv[]) { ...@@ -48,10 +48,7 @@ int main(int argc, char *argv[]) {
} }
if (line->HasSwitch("port")) { if (line->HasSwitch("port")) {
int port; if (!base::StringToInt(line->GetSwitchValueASCII("port"), &FLAGS_port)) {
if (base::StringToInt(line->GetSwitchValueASCII("port"), &port)) {
FLAGS_port = port;
} else {
LOG(ERROR) << "--port must be an integer\n"; LOG(ERROR) << "--port must be an integer\n";
return 1; return 1;
} }
......
...@@ -125,10 +125,7 @@ int main(int argc, char *argv[]) { ...@@ -125,10 +125,7 @@ int main(int argc, char *argv[]) {
FLAGS_host = line->GetSwitchValueASCII("host"); FLAGS_host = line->GetSwitchValueASCII("host");
} }
if (line->HasSwitch("port")) { if (line->HasSwitch("port")) {
int port; if (!base::StringToInt(line->GetSwitchValueASCII("port"), &FLAGS_port)) {
if (base::StringToInt(line->GetSwitchValueASCII("port"), &port)) {
FLAGS_port = port;
} else {
std::cerr << "--port must be an integer\n"; std::cerr << "--port must be an integer\n";
return 1; return 1;
} }
......
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