From 7b5ec782c992fce0e79aa4416e24753b3b5e6ff9 Mon Sep 17 00:00:00 2001 From: Will Date: Tue, 23 Jul 2024 18:51:54 -0400 Subject: [PATCH] watcher/cli: fixup codeql --- src/wtr/watcher/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wtr/watcher/main.cpp b/src/wtr/watcher/main.cpp index fb2e5ad2..b59649c8 100644 --- a/src/wtr/watcher/main.cpp +++ b/src/wtr/watcher/main.cpp @@ -64,7 +64,7 @@ struct Args { auto st = argc > 3 ? argv[3] : "0"; auto stend = st + strlen(st); auto targis = [&](auto a) { return argis(2, a); }; - auto ttons + long long ttons = targis("-nanoseconds") || targis("-ns") ? 1e0 : targis("-microseconds") || targis("-us") ? 1e3 : targis("-milliseconds") || targis("-ms") ? 1e6 @@ -80,7 +80,7 @@ struct Args { if (is_help || td == HUGE_VAL || td <= 0) return nullopt; else - return nanoseconds(llroundl(td * ttons)); + return nanoseconds(llroundl(td) * ttons); }(); return is_help || path || time