summaryrefslogtreecommitdiff
path: root/toxcore/network.c
diff options
context:
space:
mode:
authorMaxim Biro <nurupo.contributions@gmail.com>2013-09-02 11:41:10 -0400
committerMaxim Biro <nurupo.contributions@gmail.com>2013-09-02 11:41:10 -0400
commit7c11070b32e93c4ded135a8509c1064d0d7a0f53 (patch)
tree166e19a112e5679ae370efe04c4055a8f761ae74 /toxcore/network.c
parent52336565612207fdb2d2068989da936b5b83ceeb (diff)
Fixed missing field initializers warnings
Diffstat (limited to 'toxcore/network.c')
-rw-r--r--toxcore/network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/network.c b/toxcore/network.c
index 34775570..4f1f1a3a 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -62,7 +62,7 @@ uint32_t random_int(void)
62 */ 62 */
63int sendpacket(int sock, IP_Port ip_port, uint8_t *data, uint32_t length) 63int sendpacket(int sock, IP_Port ip_port, uint8_t *data, uint32_t length)
64{ 64{
65 ADDR addr = {AF_INET, ip_port.port, ip_port.ip}; 65 ADDR addr = {AF_INET, ip_port.port, ip_port.ip, {0}};
66 return sendto(sock, (char *) data, length, 0, (struct sockaddr *)&addr, sizeof(addr)); 66 return sendto(sock, (char *) data, length, 0, (struct sockaddr *)&addr, sizeof(addr));
67} 67}
68 68
@@ -207,7 +207,7 @@ Networking_Core *new_networking(IP ip, uint16_t port)
207#endif 207#endif
208 208
209 /* Bind our socket to port PORT and address 0.0.0.0 */ 209 /* Bind our socket to port PORT and address 0.0.0.0 */
210 ADDR addr = {AF_INET, htons(port), ip}; 210 ADDR addr = {AF_INET, htons(port), ip, {0}};
211 bind(temp->sock, (struct sockaddr *)&addr, sizeof(addr)); 211 bind(temp->sock, (struct sockaddr *)&addr, sizeof(addr));
212 return temp; 212 return temp;
213} 213}