Skip to content

Commit

Permalink
Merge pull request #15168 from omoerbeek/rec-coverity-20250217
Browse files Browse the repository at this point in the history
rec: coverity 20250217
  • Loading branch information
omoerbeek authored Feb 17, 2025
2 parents 28e5cd4 + 776c2fe commit deb6d31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pdns/recursordist/rec-main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2233,7 +2233,10 @@ static int serviceMain(Logr::log_t log)
}
g_networkTimeoutMsec = ::arg().asNum("network-timeout");

std::tie(*g_initialDomainMap.lock(), *g_initialAllowNotifyFor.lock()) = parseZoneConfiguration(g_yamlSettings);
{ // Reduce scope of locks (otherwise Coverity induces from this line the global vars below should be
// protected by a mutex)
std::tie(*g_initialDomainMap.lock(), *g_initialAllowNotifyFor.lock()) = parseZoneConfiguration(g_yamlSettings);
}

g_latencyStatSize = ::arg().asNum("latency-statistic-size");

Expand Down
2 changes: 1 addition & 1 deletion pdns/recursordist/ws-recursor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ void serveRustWeb()
auto logPtr = g_slog->withName("webserver");

pdns::rust::misc::LogLevel loglevel = pdns::rust::misc::LogLevel::Normal;
auto configLevel = ::arg()["webserver-loglevel"];
const auto& configLevel = ::arg()["webserver-loglevel"];
if (configLevel == "none") {
loglevel = pdns::rust::misc::LogLevel::Normal;
}
Expand Down

0 comments on commit deb6d31

Please sign in to comment.