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

Unified Diff: webrtc/base/natsocketfactory.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/messagequeue.cc ('k') | webrtc/base/network.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/natsocketfactory.cc
diff --git a/webrtc/base/natsocketfactory.cc b/webrtc/base/natsocketfactory.cc
index a23a7e8a773974837f6746ffaa36be8e3892427c..548a80caa88a1785e6355b84b0cb892d1783a63a 100644
--- a/webrtc/base/natsocketfactory.cc
+++ b/webrtc/base/natsocketfactory.cc
@@ -26,7 +26,7 @@ size_t PackAddressForNAT(char* buf, size_t buf_size,
buf[0] = 0;
buf[1] = family;
// Writes the port.
- *(reinterpret_cast<uint16*>(&buf[2])) = HostToNetwork16(remote_addr.port());
+ *(reinterpret_cast<uint16_t*>(&buf[2])) = HostToNetwork16(remote_addr.port());
if (family == AF_INET) {
ASSERT(buf_size >= kNATEncodedIPv4AddressSize);
in_addr v4addr = ip.ipv4_address();
@@ -49,7 +49,8 @@ size_t UnpackAddressFromNAT(const char* buf, size_t buf_size,
ASSERT(buf_size >= 8);
ASSERT(buf[0] == 0);
int family = buf[1];
- uint16 port = NetworkToHost16(*(reinterpret_cast<const uint16*>(&buf[2])));
+ uint16_t port =
+ NetworkToHost16(*(reinterpret_cast<const uint16_t*>(&buf[2])));
if (family == AF_INET) {
const in_addr* v4addr = reinterpret_cast<const in_addr*>(&buf[4]);
*remote_addr = SocketAddress(IPAddress(*v4addr), port);
@@ -220,7 +221,7 @@ class NATSocket : public AsyncSocket, public sigslot::has_slots<> {
ConnState GetState() const override {
return connected_ ? CS_CONNECTED : CS_CLOSED;
}
- int EstimateMTU(uint16* mtu) override { return socket_->EstimateMTU(mtu); }
+ int EstimateMTU(uint16_t* mtu) override { return socket_->EstimateMTU(mtu); }
int GetOption(Option opt, int* value) override {
return socket_->GetOption(opt, value);
}
« no previous file with comments | « webrtc/base/messagequeue.cc ('k') | webrtc/base/network.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698