Exit after printing usage message.

We should not continue the program if the user asked for help.

Tested on Linux with the following command line:

$ out/Debug/frame_analyzer --help

BUG=None
TEST=see above
R=kjellander@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/44069004

Patch from Thiago Farina <tfarina@chromium.org>.

Cr-Commit-Position: refs/heads/master@{#8961}
This commit is contained in:
Thiago Farina 2015-04-09 15:45:12 +02:00 committed by Henrik Kjellander
parent 7f6c4d42a2
commit 3a93986fd5
5 changed files with 5 additions and 0 deletions

View File

@ -230,6 +230,7 @@ int main(int argc, char** argv) {
parser.ProcessFlags();
if (parser.GetFlag("help") == "true") {
parser.PrintUsageMessage();
exit(EXIT_SUCCESS);
}
parser.PrintEnteredFlags();

View File

@ -61,6 +61,7 @@ int main(int argc, char** argv) {
parser.ProcessFlags();
if (parser.GetFlag("help") == "true") {
parser.PrintUsageMessage();
exit(EXIT_SUCCESS);
}
parser.PrintEnteredFlags();

View File

@ -74,6 +74,7 @@ int main(int argc, char** argv) {
parser.ProcessFlags();
if (parser.GetFlag("help") == "true") {
parser.PrintUsageMessage();
exit(EXIT_SUCCESS);
}
parser.PrintEnteredFlags();

View File

@ -77,6 +77,7 @@ int main(int argc, char** argv) {
parser.ProcessFlags();
if (parser.GetFlag("help") == "true") {
parser.PrintUsageMessage();
exit(EXIT_SUCCESS);
}
parser.PrintEnteredFlags();

View File

@ -115,6 +115,7 @@ int main(int argc, char** argv) {
parser.ProcessFlags();
if (parser.GetFlag("help") == "true") {
parser.PrintUsageMessage();
exit(EXIT_SUCCESS);
}
parser.PrintEnteredFlags();