Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use global variable in function, pass parameter instead. #269

Merged
merged 1 commit into from
Jun 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fswatch/src/fswatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ static bool parse_event_filter(const char *optarg)
}
}

static bool validate_latency(double latency)
static bool validate_latency(double latency, const char *optarg)
{
if (latency == 0.0)
{
Expand Down Expand Up @@ -594,7 +594,7 @@ static void parse_opts(int argc, char **argv)
case 'l':
lvalue = strtod(optarg, nullptr);

if (!validate_latency(lvalue))
if (!validate_latency(lvalue, optarg))
{
exit(FSW_EXIT_LATENCY);
}
Expand Down