Skip to content

Commit

Permalink
Set to default value when specified
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-hwoo committed Aug 10, 2023
1 parent 55d00a8 commit a85fff0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/c++/perf_analyzer/command_line_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,10 @@ CLParser::ParseCommandLine(int argc, char** argv)
case 8:
case 'l': {
std::string latency_threshold_ms{optarg};
if (std::stoi(latency_threshold_ms) >= 0) {
if (std::stoi(latency_threshold_ms) == 0) {
params_->latency_threshold_ms = NO_LIMIT;
}
if (std::stoi(latency_threshold_ms) > 0) {
params_->latency_threshold_ms = std::stoi(latency_threshold_ms);
} else {
Usage(
Expand Down

0 comments on commit a85fff0

Please sign in to comment.