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

Unified Diff: webrtc/base/win32socketserver.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
« no previous file with comments | « webrtc/base/win32socketserver.h ('k') | webrtc/base/win32socketserver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/win32socketserver.cc
diff --git a/webrtc/base/win32socketserver.cc b/webrtc/base/win32socketserver.cc
index 2adb0d3d27bc5ccc97511cb16a694316d5a18b17..743f8c0d5990a8041af04ed579f3db4812f72617 100644
--- a/webrtc/base/win32socketserver.cc
+++ b/webrtc/base/win32socketserver.cc
@@ -28,26 +28,26 @@ namespace rtc {
// TODO: Move this to a common place where PhysicalSocketServer can
// share it.
// Standard MTUs
-static const uint16 PACKET_MAXIMUMS[] = {
- 65535, // Theoretical maximum, Hyperchannel
- 32000, // Nothing
- 17914, // 16Mb IBM Token Ring
- 8166, // IEEE 802.4
- // 4464 // IEEE 802.5 (4Mb max)
- 4352, // FDDI
- // 2048, // Wideband Network
- 2002, // IEEE 802.5 (4Mb recommended)
- // 1536, // Expermental Ethernet Networks
- // 1500, // Ethernet, Point-to-Point (default)
- 1492, // IEEE 802.3
- 1006, // SLIP, ARPANET
- // 576, // X.25 Networks
- // 544, // DEC IP Portal
- // 512, // NETBIOS
- 508, // IEEE 802/Source-Rt Bridge, ARCNET
- 296, // Point-to-Point (low delay)
- 68, // Official minimum
- 0, // End of list marker
+static const uint16_t PACKET_MAXIMUMS[] = {
+ 65535, // Theoretical maximum, Hyperchannel
+ 32000, // Nothing
+ 17914, // 16Mb IBM Token Ring
+ 8166, // IEEE 802.4
+ // 4464 // IEEE 802.5 (4Mb max)
+ 4352, // FDDI
+ // 2048, // Wideband Network
+ 2002, // IEEE 802.5 (4Mb recommended)
+ // 1536, // Expermental Ethernet Networks
+ // 1500, // Ethernet, Point-to-Point (default)
+ 1492, // IEEE 802.3
+ 1006, // SLIP, ARPANET
+ // 576, // X.25 Networks
+ // 544, // DEC IP Portal
+ // 512, // NETBIOS
+ 508, // IEEE 802/Source-Rt Bridge, ARCNET
+ 296, // Point-to-Point (low delay)
+ 68, // Official minimum
+ 0, // End of list marker
};
static const int IP_HEADER_SIZE = 20u;
@@ -143,7 +143,7 @@ void ReportWSAError(LPCSTR context, int error, const SocketAddress& address) {}
struct Win32Socket::DnsLookup {
HANDLE handle;
- uint16 port;
+ uint16_t port;
char buffer[MAXGETHOSTSTRUCT];
};
@@ -512,7 +512,7 @@ int Win32Socket::Close() {
return err;
}
-int Win32Socket::EstimateMTU(uint16* mtu) {
+int Win32Socket::EstimateMTU(uint16_t* mtu) {
SocketAddress addr = GetRemoteAddress();
if (addr.IsAny()) {
error_ = ENOTCONN;
@@ -526,7 +526,7 @@ int Win32Socket::EstimateMTU(uint16* mtu) {
}
for (int level = 0; PACKET_MAXIMUMS[level + 1] > 0; ++level) {
- int32 size = PACKET_MAXIMUMS[level] - IP_HEADER_SIZE - ICMP_HEADER_SIZE;
+ int32_t size = PACKET_MAXIMUMS[level] - IP_HEADER_SIZE - ICMP_HEADER_SIZE;
WinPing::PingResult result = ping.Ping(addr.ipaddr(), size,
ICMP_PING_TIMEOUT_MILLIS, 1, false);
if (result == WinPing::PING_FAIL) {
@@ -627,7 +627,7 @@ void Win32Socket::OnSocketNotify(SOCKET socket, int event, int error) {
if (error != ERROR_SUCCESS) {
ReportWSAError("WSAAsync:connect notify", error, addr_);
#ifdef _DEBUG
- int32 duration = TimeSince(connect_time_);
+ int32_t duration = TimeSince(connect_time_);
LOG(LS_INFO) << "WSAAsync:connect error (" << duration
<< " ms), faking close";
#endif
@@ -640,7 +640,7 @@ void Win32Socket::OnSocketNotify(SOCKET socket, int event, int error) {
SignalCloseEvent(this, error);
} else {
#ifdef _DEBUG
- int32 duration = TimeSince(connect_time_);
+ int32_t duration = TimeSince(connect_time_);
LOG(LS_INFO) << "WSAAsync:connect (" << duration << " ms)";
#endif
state_ = CS_CONNECTED;
@@ -679,10 +679,10 @@ void Win32Socket::OnDnsNotify(HANDLE task, int error) {
if (!dns_ || dns_->handle != task)
return;
- uint32 ip = 0;
+ uint32_t ip = 0;
if (error == 0) {
hostent* pHost = reinterpret_cast<hostent*>(dns_->buffer);
- uint32 net_ip = *reinterpret_cast<uint32*>(pHost->h_addr_list[0]);
+ uint32_t net_ip = *reinterpret_cast<uint32_t*>(pHost->h_addr_list[0]);
ip = NetworkToHost32(net_ip);
}
@@ -762,7 +762,7 @@ bool Win32SocketServer::Wait(int cms, bool process_io) {
if (process_io) {
// Spin the Win32 message pump at least once, and as long as requested.
// This is the Thread::ProcessMessages case.
- uint32 start = Time();
+ uint32_t start = Time();
do {
MSG msg;
SetTimer(wnd_.handle(), 0, cms, NULL);
« no previous file with comments | « webrtc/base/win32socketserver.h ('k') | webrtc/base/win32socketserver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698