summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/network.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/toxcore/network.c b/toxcore/network.c
index b40f7d56..b00204a2 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -267,13 +267,11 @@ Networking_Core *new_networking(IP ip, uint16_t port)
267 if (temp == NULL) 267 if (temp == NULL)
268 return NULL; 268 return NULL;
269 269
270 sa_family_t family = 0;
271#ifdef TOX_ENABLE_IPV6 270#ifdef TOX_ENABLE_IPV6
272 family = ip.family; 271 temp->family = ip.family;
273#else 272#else
274 family = AF_INET; 273 temp->family = AF_INET;
275#endif 274#endif
276 temp->family = family;
277 temp->port = 0; 275 temp->port = 0;
278 276
279 /* Initialize our socket. */ 277 /* Initialize our socket. */