cast return values in uint16_t RTPFile::Read() to uint16_t to avoid compile error

BUG=3663
TESTED=ninja local build on windows.
R=andrew@webrtc.org, kwiberg@webrtc.org, thorcarpenter@google.com

Review URL: https://webrtc-codereview.appspot.com/16229004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7049 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
fbarchard@google.com 2014-09-03 23:05:07 +00:00
parent 5b83af49c1
commit 9328f39a3e

View File

@ -231,13 +231,13 @@ uint16_t RTPFile::Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData,
EXPECT_EQ(lengthBytes, plen + 8);
if (plen == 0) {
return 0;
return static_cast<uint16_t>(0);
}
if (payloadSize < (lengthBytes - 20)) {
return 0;
return static_cast<uint16_t>(0);
}
if (lengthBytes < 20) {
return 0;
return static_cast<uint16_t>(0);
}
lengthBytes -= 20;
EXPECT_EQ(lengthBytes, fread(payloadData, 1, lengthBytes, _rtpFile));