From be4dc0d674d87bf3736502972d90c3394fda298c Mon Sep 17 00:00:00 2001 From: Erick Turnquist Date: Wed, 17 Dec 2008 01:39:24 +0000 Subject: [PATCH] (trunk libT) use an enum tr_address_type instead of uint8_t for tr_address.type --- libtransmission/net.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libtransmission/net.h b/libtransmission/net.h index 04d2cb25d..f49f80c97 100644 --- a/libtransmission/net.h +++ b/libtransmission/net.h @@ -55,11 +55,15 @@ struct tr_session; -#define TR_AF_INET 0 -#define TR_AF_INET6 1 +typedef enum tr_address_type +{ + TR_AF_INET, + TR_AF_INET6 +} tr_address_type; -typedef struct tr_address { - uint8_t type; +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 */