From d2d1af2ce91d7a774534be5864096e04af3621ae Mon Sep 17 00:00:00 2001 From: Kostya Date: Fri, 30 Aug 2013 02:51:15 -0400 Subject: Made IP_Port a union. --- toxcore/network.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'toxcore/network.h') diff --git a/toxcore/network.h b/toxcore/network.h index 0a0122be..685341ad 100644 --- a/toxcore/network.h +++ b/toxcore/network.h @@ -86,11 +86,14 @@ typedef union { uint32_t i; } IP; -typedef struct { - IP ip; - uint16_t port; - /* Not used for anything right now. */ - uint16_t padding; +typedef union { + struct { + IP ip; + uint16_t port; + /* Not used for anything right now. */ + uint16_t padding; + }; + uint8_t uint8[8]; } IP_Port; typedef struct { -- cgit v1.2.3