diff --git a/libtransmission/net.h b/libtransmission/net.h index 46e7e7944..0a066e68c 100644 --- a/libtransmission/net.h +++ b/libtransmission/net.h @@ -87,12 +87,12 @@ typedef struct tr_address tr_address_type type; union { - /* The order here is important for tr_in{,6}addr_any initialization, - * since we can't use C99 designated initializers */ struct in6_addr addr6; struct in_addr addr4; - } addr; -} tr_address; + } + addr; +} +tr_address; extern tr_address const tr_inaddr_any; extern tr_address const tr_in6addr_any; @@ -111,7 +111,7 @@ bool tr_address_is_valid_for_peers(tr_address const* addr, tr_port port); static inline bool tr_address_is_valid(tr_address const* a) { - return (a != NULL) && (a->type == TR_AF_INET || a->type == TR_AF_INET6); + return a != NULL && (a->type == TR_AF_INET || a->type == TR_AF_INET6); } /***********************************************************************