Skip to content

Commit

Permalink
[core] Fixed local variable 'i' hiding previous local declaration.
Browse files Browse the repository at this point in the history
Fixes #2371.
  • Loading branch information
maxsharabayko committed Jun 15, 2022
1 parent 88aab43 commit 61170ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10067,9 +10067,9 @@ int srt::CUDT::processData(CUnit* in_unit)
// Loop over all incoming packets that were filtered out.
// In case when there is no filter, there's just one packet in 'incoming',
// the one that came in the input of this function.
for (vector<CUnit *>::iterator i = incoming.begin(); i != incoming.end(); ++i)
for (vector<CUnit *>::iterator unitIt = incoming.begin(); unitIt != incoming.end(); ++unitIt)
{
CUnit * u = *i;
CUnit * u = *unitIt;
CPacket &rpkt = u->m_Packet;

// m_iRcvLastSkipAck is the base sequence number for the receiver buffer.
Expand Down Expand Up @@ -10151,9 +10151,9 @@ int srt::CUDT::processData(CUnit* in_unit)

bool adding_successful = true;
#if ENABLE_NEW_RCVBUFFER
if (m_pRcvBuffer->insert(*i) < 0)
if (m_pRcvBuffer->insert(u) < 0)
#else
if (m_pRcvBuffer->addData(*i, offset) < 0)
if (m_pRcvBuffer->addData(u, offset) < 0)
#endif
{
// addData returns -1 if at the m_iLastAckPos+offset position there already is a packet.
Expand Down

0 comments on commit 61170ad

Please sign in to comment.