Skip to content

Commit

Permalink
fixup: Fix p scope
Browse files Browse the repository at this point in the history
Also removed an unwanted empty line.
  • Loading branch information
rousskov authored Dec 12, 2024
1 parent 0eea75b commit b38a746
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/neighbors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,8 @@ getFirstUpParent(PeerSelector *ps)
assert(ps);
HttpRequest *request = ps->request;

CachePeer *p = nullptr;

for (const auto &peer: CurrentCachePeers()) {
p = peer.get();
const auto p = peer.get();

if (!neighborUp(p))
continue;
Expand All @@ -297,7 +295,6 @@ getFirstUpParent(PeerSelector *ps)
continue;

debugs(15, 3, "returning " << *p);

return p;
}

Expand Down

0 comments on commit b38a746

Please sign in to comment.