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:
parent
7f6c4d42a2
commit
3a93986fd5
@ -230,6 +230,7 @@ int main(int argc, char** argv) {
|
||||
parser.ProcessFlags();
|
||||
if (parser.GetFlag("help") == "true") {
|
||||
parser.PrintUsageMessage();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
parser.PrintEnteredFlags();
|
||||
|
||||
|
@ -61,6 +61,7 @@ int main(int argc, char** argv) {
|
||||
parser.ProcessFlags();
|
||||
if (parser.GetFlag("help") == "true") {
|
||||
parser.PrintUsageMessage();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
parser.PrintEnteredFlags();
|
||||
|
||||
|
@ -74,6 +74,7 @@ int main(int argc, char** argv) {
|
||||
parser.ProcessFlags();
|
||||
if (parser.GetFlag("help") == "true") {
|
||||
parser.PrintUsageMessage();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
parser.PrintEnteredFlags();
|
||||
|
||||
|
@ -77,6 +77,7 @@ int main(int argc, char** argv) {
|
||||
parser.ProcessFlags();
|
||||
if (parser.GetFlag("help") == "true") {
|
||||
parser.PrintUsageMessage();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
parser.PrintEnteredFlags();
|
||||
|
||||
|
@ -115,6 +115,7 @@ int main(int argc, char** argv) {
|
||||
parser.ProcessFlags();
|
||||
if (parser.GetFlag("help") == "true") {
|
||||
parser.PrintUsageMessage();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
parser.PrintEnteredFlags();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user