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

Unified Diff: net/tools/quic/quic_socket_utils.cc

Issue 612323013: QUIC - (no behavior change) s/NULL/nullptr/g in .../quic/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « net/tools/quic/quic_server_session_test.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_socket_utils.cc
diff --git a/net/tools/quic/quic_socket_utils.cc b/net/tools/quic/quic_socket_utils.cc
index f635515a3cf651cf212308b22c052ff2c5126cb9..f11647b9cf8de0391df0e7c9457550f98fab01d1 100644
--- a/net/tools/quic/quic_socket_utils.cc
+++ b/net/tools/quic/quic_socket_utils.cc
@@ -26,9 +26,9 @@ namespace tools {
IPAddressNumber QuicSocketUtils::GetAddressFromMsghdr(struct msghdr *hdr) {
if (hdr->msg_controllen > 0) {
for (cmsghdr* cmsg = CMSG_FIRSTHDR(hdr);
- cmsg != NULL;
+ cmsg != nullptr;
cmsg = CMSG_NXTHDR(hdr, cmsg)) {
- const uint8* addr_data = NULL;
+ const uint8* addr_data = nullptr;
int len = 0;
if (cmsg->cmsg_type == IPV6_PKTINFO) {
in6_pktinfo* info = reinterpret_cast<in6_pktinfo*>CMSG_DATA(cmsg);
@@ -56,7 +56,7 @@ bool QuicSocketUtils::GetOverflowFromMsghdr(struct msghdr *hdr,
if (hdr->msg_controllen > 0) {
struct cmsghdr *cmsg;
for (cmsg = CMSG_FIRSTHDR(hdr);
- cmsg != NULL;
+ cmsg != nullptr;
cmsg = CMSG_NXTHDR(hdr, cmsg)) {
if (cmsg->cmsg_type == SO_RXQ_OVFL) {
*dropped_packets = *(reinterpret_cast<int*>CMSG_DATA(cmsg));
@@ -102,7 +102,7 @@ int QuicSocketUtils::ReadPacket(int fd, char* buffer, size_t buf_len,
uint32* dropped_packets,
IPAddressNumber* self_address,
IPEndPoint* peer_address) {
- CHECK(peer_address != NULL);
+ CHECK(peer_address != nullptr);
const int kSpaceForOverflowAndIp =
CMSG_SPACE(sizeof(int)) + CMSG_SPACE(sizeof(in6_pktinfo));
char cbuf[kSpaceForOverflowAndIp];
@@ -134,10 +134,10 @@ int QuicSocketUtils::ReadPacket(int fd, char* buffer, size_t buf_len,
return -1;
}
- if (dropped_packets != NULL) {
+ if (dropped_packets != nullptr) {
GetOverflowFromMsghdr(&hdr, dropped_packets);
}
- if (self_address != NULL) {
+ if (self_address != nullptr) {
*self_address = QuicSocketUtils::GetAddressFromMsghdr(&hdr);
}
« no previous file with comments | « net/tools/quic/quic_server_session_test.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698