Commit a9dffbc96e353c26d0320871028ff8902f6a0a99

Authored by Georg Hopp
1 parent 1363a884

can't use the terneries in that way because the result in different types then.

Showing 1 changed file with 2 additions and 6 deletions
... ... @@ -75,12 +75,8 @@ TR_INSTANCE_INIT(TR_Socket);
75 75 #define TR_socketCname(socket) (((TR_Socket)(socket))->cname)
76 76 #define TR_socketTtl(socket) (((TR_Socket)(socket))->ttl)
77 77
78   -#define TR_socketAddr(socket) \
79   - (((TR_Socket)(socket))->addr.info.sa_family == AF_INET \
80   - ? ((TR_Socket)(socket))->addr.in \
81   - : ((TR_Socket)(socket))->addr.info.sa_family == AF_INET6 \
82   - ? ((TR_Socket)(socket))->addr.in6 \
83   - : NULL)
  78 +#define TR_socketAddr(socket) \
  79 + ((unsigned char *)&((TR_Socket)(socket))->addr)
84 80
85 81 #define TR_socketAddrlen(socket) (((TR_Socket)(socket))->addrlen)
86 82 #define TR_socketHandle(socket) (((TR_Socket)(socket))->handle)
... ...
Please register or login to post a comment