summaryrefslogtreecommitdiff
path: root/toxcore/network.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-01-28 21:30:39 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-01-30 23:35:50 +0000
commit92ffad1a72bc8c422426d52ac408bd71242dd047 (patch)
treef592f353068dd2043525dd2cc04d6124a4ed4bc4 /toxcore/network.h
parent623e9ac331df7323660e21c8a2226523a5ee713b (diff)
Use nullptr as NULL pointer constant instead of NULL or 0.
This changes only code, no string literals or comments.
Diffstat (limited to 'toxcore/network.h')
-rw-r--r--toxcore/network.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/toxcore/network.h b/toxcore/network.h
index d3b80218..a698fdc9 100644
--- a/toxcore/network.h
+++ b/toxcore/network.h
@@ -125,17 +125,16 @@ typedef enum NET_PACKET_TYPE {
125#define TCP_INET6 (TOX_AF_INET6 + 3) 125#define TCP_INET6 (TOX_AF_INET6 + 3)
126#define TCP_FAMILY (TOX_AF_INET6 + 4) 126#define TCP_FAMILY (TOX_AF_INET6 + 4)
127 127
128typedef union { 128typedef union IP4 {
129 uint32_t uint32; 129 uint32_t uint32;
130 uint16_t uint16[2]; 130 uint16_t uint16[2];
131 uint8_t uint8[4]; 131 uint8_t uint8[4];
132} 132} IP4;
133IP4;
134 133
135IP4 get_ip4_loopback(void); 134IP4 get_ip4_loopback(void);
136extern const IP4 IP4_BROADCAST; 135extern const IP4 IP4_BROADCAST;
137 136
138typedef union { 137typedef union IP6 {
139 uint8_t uint8[16]; 138 uint8_t uint8[16];
140 uint16_t uint16[8]; 139 uint16_t uint16[8];
141 uint32_t uint32[4]; 140 uint32_t uint32[4];
@@ -146,7 +145,7 @@ IP6 get_ip6_loopback(void);
146extern const IP6 IP6_BROADCAST; 145extern const IP6 IP6_BROADCAST;
147 146
148#define IP_DEFINED 147#define IP_DEFINED
149typedef struct { 148typedef struct IP {
150 uint8_t family; 149 uint8_t family;
151 GNU_EXTENSION union { 150 GNU_EXTENSION union {
152 IP4 ip4; 151 IP4 ip4;