Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Unified Diff: webrtc/p2p/base/asyncstuntcpsocket.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/asyncstuntcpsocket.cc
diff --git a/webrtc/p2p/base/asyncstuntcpsocket.cc b/webrtc/p2p/base/asyncstuntcpsocket.cc
index 2b1b693588cd625f7adf95bd3bbaef986d30df22..444f06146a461c5146ba2918507c3e39f7ccec8d 100644
--- a/webrtc/p2p/base/asyncstuntcpsocket.cc
+++ b/webrtc/p2p/base/asyncstuntcpsocket.cc
@@ -20,13 +20,13 @@ namespace cricket {
static const size_t kMaxPacketSize = 64 * 1024;
-typedef uint16 PacketLength;
+typedef uint16_t PacketLength;
static const size_t kPacketLenSize = sizeof(PacketLength);
static const size_t kPacketLenOffset = 2;
static const size_t kBufSize = kMaxPacketSize + kStunHeaderSize;
static const size_t kTurnChannelDataHdrSize = 4;
-inline bool IsStunMessage(uint16 msg_type) {
+inline bool IsStunMessage(uint16_t msg_type) {
// The first two bits of a channel data message are 0b01.
return (msg_type & 0xC000) ? false : true;
}
@@ -129,7 +129,7 @@ size_t AsyncStunTCPSocket::GetExpectedLength(const void* data, size_t len,
PacketLength pkt_len =
rtc::GetBE16(static_cast<const char*>(data) + kPacketLenOffset);
size_t expected_pkt_len;
- uint16 msg_type = rtc::GetBE16(data);
+ uint16_t msg_type = rtc::GetBE16(data);
if (IsStunMessage(msg_type)) {
// STUN message.
expected_pkt_len = kStunHeaderSize + pkt_len;
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc ('k') | webrtc/p2p/base/basicpacketsocketfactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698