Skip to content

Commit

Permalink
Clang format, fix compiler Werror
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankiesz committed Nov 8, 2024
1 parent 9f726b3 commit e8634be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/source/PeerConnection/PeerConnection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ STATUS freePeerConnection(PRtcPeerConnection* ppPeerConnection)
SAFE_MEMFREE(*ppPeerConnection);
ppPeerConnection = NULL;
CleanUp:
if (ppPeerConnection != NULL && *ppPeerConnection != NULL ) {
if (ppPeerConnection != NULL && *ppPeerConnection != NULL) {
if (IS_VALID_MUTEX_VALUE(pKvsPeerConnection->twccLock)) {
if (twccLocked) {
MUTEX_UNLOCK(pKvsPeerConnection->twccLock);
Expand Down
19 changes: 12 additions & 7 deletions src/source/PeerConnection/Rtcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ STATUS parseRtcpTwccPacket(PRtcpPacket pRtcpPacket, PTwccManager pTwccManager)
return retStatus;
}

STATUS updateTwccHashTable(PTwccManager pTwccManager, PINT64 duration, PUINT64 receivedBytes, PUINT64 receivedPackets, PUINT64 sentBytes, PUINT64 sentPackets)
STATUS updateTwccHashTable(PTwccManager pTwccManager, PINT64 duration, PUINT64 receivedBytes, PUINT64 receivedPackets, PUINT64 sentBytes,
PUINT64 sentPackets)
{
STATUS retStatus = STATUS_SUCCESS;
UINT64 localStartTimeKvs, localEndTimeKvs = 0;
Expand All @@ -327,9 +328,14 @@ STATUS updateTwccHashTable(PTwccManager pTwccManager, PINT64 duration, PUINT64 r
PTwccRtpPacketInfo pTwccPacket = NULL;
UINT16 seqNum = 0;

duration, *sentBytes, *receivedBytes, *receivedPackets, *sentBytes, *sentPackets = 0;
duration = 0;
*sentBytes = 0;
*receivedBytes = 0;
*receivedPackets = 0;
*sentPackets = 0;

CHK(pTwccManager != NULL && duration != NULL && receivedBytes != NULL && receivedPackets != NULL && sentBytes != NULL && sentPackets != NULL, STATUS_NULL_ARG);
CHK(pTwccManager != NULL && duration != NULL && receivedBytes != NULL && receivedPackets != NULL && sentBytes != NULL && sentPackets != NULL,
STATUS_NULL_ARG);

baseSeqNum = pTwccManager->prevReportedBaseSeqNum;

Expand Down Expand Up @@ -385,11 +391,10 @@ STATUS updateTwccHashTable(PTwccManager pTwccManager, PINT64 duration, PUINT64 r
}

CleanUp:
CHK_LOG_ERR(retStatus);
return retStatus;
CHK_LOG_ERR(retStatus);
return retStatus;
}


STATUS onRtcpTwccPacket(PRtcpPacket pRtcpPacket, PKvsPeerConnection pKvsPeerConnection)
{
STATUS retStatus = STATUS_SUCCESS;
Expand All @@ -398,7 +403,7 @@ STATUS onRtcpTwccPacket(PRtcpPacket pRtcpPacket, PKvsPeerConnection pKvsPeerConn
UINT64 sentBytes = 0, receivedBytes = 0;
UINT64 sentPackets = 0, receivedPackets = 0;
INT64 duration = 0;

CHK(pKvsPeerConnection != NULL && pRtcpPacket != NULL, STATUS_NULL_ARG);
CHK(pKvsPeerConnection->pTwccManager != NULL && pKvsPeerConnection->onSenderBandwidthEstimation != NULL, STATUS_SUCCESS);

Expand Down

0 comments on commit e8634be

Please sign in to comment.