Skip to content

Commit

Permalink
[core] Fixed CUDT::packUniqueData return value.
Browse files Browse the repository at this point in the history
Truncation from 'int' to 'bool'.
  • Loading branch information
maxsharabayko committed Jun 10, 2022
1 parent fba72ac commit 5247d91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion srtcore/buffer_rcv.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class CRcvBufferNew
private:
inline int incPos(int pos, int inc = 1) const { return (pos + inc) % m_szSize; }
inline int decPos(int pos) const { return (pos - 1) >= 0 ? (pos - 1) : int(m_szSize - 1); }
inline int offPos(int pos1, int pos2) const { return (pos2 >= pos1) ? (pos2 - pos1) : (m_szSize + pos2 - pos1); }
inline int offPos(int pos1, int pos2) const { return (pos2 >= pos1) ? (pos2 - pos1) : int(m_szSize + pos2 - pos1); }

private:
void countBytes(int pkts, int bytes);
Expand Down
2 changes: 1 addition & 1 deletion srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9704,7 +9704,7 @@ bool srt::CUDT::packUniqueData(CPacket& w_packet, time_point& w_origintime)
// Encryption failed
//>>Add stats for crypto failure
LOGC(qslog.Warn, log << "ENCRYPT FAILED - packet won't be sent, size=" << pld_size);
return -1;
return false;
}
}

Expand Down

0 comments on commit 5247d91

Please sign in to comment.