From ec7b0097520add02d9b48faef43a9eaf2c4304c0 Mon Sep 17 00:00:00 2001 From: "raphael.kubo.da.costa" Date: Mon, 7 Nov 2016 10:45:55 -0800 Subject: [PATCH] Finish reformatting RTCPUtility::RTCPParserV2::Validate() Half of the function's code was reformatted and reindented in https://codereview.webrtc.org/1307663004, but the bottom half was still adhering to an old coding style and using different indentation values. Not only does this make the code look confusing, but it can cause build issues on certain compilers: for example, GCC 6.2.0 with -Wall causes the build to fail because -Wmisleading-indentation is enabled. BUG=None R=asapersson@webrtc.org,danilchap@webrtc.org Review-Url: https://codereview.webrtc.org/2479193002 Cr-Commit-Position: refs/heads/master@{#14957} --- .../modules/rtp_rtcp/source/rtcp_utility.cc | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc b/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc index c4f688aac4..2c26fa79db 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc @@ -433,24 +433,22 @@ RTCPUtility::RTCPParserV2::Validate() _ptrRTCPDataEnd - _ptrRTCPDataBegin, &header)) return; // NOT VALID! - // * if (!reducedSize) : first packet must be RR or SR. - // - // * The padding bit (P) should be zero for the first packet of a - // compound RTCP packet because padding should only be applied, - // if it is needed, to the last packet. (NOT CHECKED!) - // - // * The length fields of the individual RTCP packets must add up - // to the overall length of the compound RTCP packet as - // received. This is a fairly strong check. (NOT CHECKED!) + // * if (!reducedSize) : first packet must be RR or SR. + // + // * The padding bit (P) should be zero for the first packet of a + // compound RTCP packet because padding should only be applied, + // if it is needed, to the last packet. (NOT CHECKED!) + // + // * The length fields of the individual RTCP packets must add up + // to the overall length of the compound RTCP packet as + // received. This is a fairly strong check. (NOT CHECKED!) - if (!_RTCPReducedSizeEnable) - { - if ((header.packet_type != PT_SR) && (header.packet_type != PT_RR)) { - return; // NOT VALID - } - } + if (!_RTCPReducedSizeEnable) { + if ((header.packet_type != PT_SR) && (header.packet_type != PT_RR)) + return; // NOT VALID + } - _validPacket = true; + _validPacket = true; } bool