Skip to content

Commit

Permalink
[core] Minor fix of variable shadowing.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Apr 25, 2023
1 parent 6fcff6d commit 30e7ccd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ int srt::CUDTUnited::newConnection(const SRTSOCKET listen,
// XXX this might require another check of group type.
// For redundancy group, at least, update the status in the group
CUDTGroup* g = ns->m_GroupOf;
ScopedLock glock(g->m_GroupLock);
ScopedLock grlock(g->m_GroupLock);
if (g->m_bClosing)
{
error = 1; // "INTERNAL REJECTION"
Expand Down
2 changes: 0 additions & 2 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9726,8 +9726,6 @@ void srt::CUDT::processClose()

void srt::CUDT::sendLossReport(const std::vector<std::pair<int32_t, int32_t> > &loss_seqs)
{
typedef vector<pair<int32_t, int32_t> > loss_seqs_t;

vector<int32_t> seqbuffer;
seqbuffer.reserve(2 * loss_seqs.size()); // pessimistic
for (loss_seqs_t::const_iterator i = loss_seqs.begin(); i != loss_seqs.end(); ++i)
Expand Down
4 changes: 2 additions & 2 deletions srtcore/epoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ void srt::CEPoll::clear_ready_usocks(CEPollDesc& d, int direction)
}
}

for (size_t i = 0; i < cleared.size(); ++i)
d.removeSubscription(cleared[i]);
for (size_t j = 0; j < cleared.size(); ++j)
d.removeSubscription(cleared[j]);
}

int srt::CEPoll::add_ssock(const int eid, const SYSSOCKET& s, const int* events)
Expand Down

0 comments on commit 30e7ccd

Please sign in to comment.