Merge pull request #1784 from nghttp2/fix-covscan-errors

Fix errors reported by coverity scan
This commit is contained in:
Tatsuhiro Tsujikawa 2022-08-22 19:37:29 +09:00 committed by GitHub
commit df000cd01b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1805,7 +1805,7 @@ void worker_acceptcb(struct ev_loop *loop, ev_async *w, int revents) {
q.swap(worker->q); q.swap(worker->q);
} }
for (auto c : q) { for (const auto &c : q) {
sessions->accept_connection(c.fd); sessions->accept_connection(c.fd);
} }
} }

View File

@ -1093,7 +1093,7 @@ std::vector<InheritedAddr> get_inherited_addr_from_env(Config *config) {
auto portenv = getenv(ENV_PORT.c_str()); auto portenv = getenv(ENV_PORT.c_str());
if (portenv) { if (portenv) {
size_t i = 1; size_t i = 1;
for (auto env_name : {ENV_LISTENER4_FD, ENV_LISTENER6_FD}) { for (const auto &env_name : {ENV_LISTENER4_FD, ENV_LISTENER6_FD}) {
auto fdenv = getenv(env_name.c_str()); auto fdenv = getenv(env_name.c_str());
if (fdenv) { if (fdenv) {
auto name = ENV_ACCEPT_PREFIX.str(); auto name = ENV_ACCEPT_PREFIX.str();