Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Unified Diff: net/quic/quic_server_bin.cc

Issue 938853002: quic_client should check return codes when parsing command-line flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/tools/quic/quic_client_bin.cc » ('j') | net/tools/quic/quic_client_bin.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_server_bin.cc
diff --git a/net/quic/quic_server_bin.cc b/net/quic/quic_server_bin.cc
index 320f3dac458fa99064a7c9bfbbab53fac5ee3758..e7c2a6ca04afdd6d4e13a3ec98b5369b43c9338b 100644
--- a/net/quic/quic_server_bin.cc
+++ b/net/quic/quic_server_bin.cc
@@ -51,6 +51,9 @@ int main(int argc, char *argv[]) {
int port;
if (base::StringToInt(line->GetSwitchValueASCII("port"), &port)) {
FLAGS_port = port;
+ } else {
+ LOG(ERROR) << "--port must be an integer\n";
+ return 1;
Ryan Hamilton 2015/02/18 23:51:13 Early return please: if (!base::StringToInt()) {
dougk 2015/02/19 00:29:19 Done.
}
}
« no previous file with comments | « no previous file | net/tools/quic/quic_client_bin.cc » ('j') | net/tools/quic/quic_client_bin.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698