Browse Source

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

1.0.0
Georg Hopp 12 years ago
parent
commit
a9dffbc96e
  1. 8
      include/tr/socket.h

8
include/tr/socket.h

@ -75,12 +75,8 @@ TR_INSTANCE_INIT(TR_Socket);
#define TR_socketCname(socket) (((TR_Socket)(socket))->cname)
#define TR_socketTtl(socket) (((TR_Socket)(socket))->ttl)
#define TR_socketAddr(socket) \
(((TR_Socket)(socket))->addr.info.sa_family == AF_INET \
? ((TR_Socket)(socket))->addr.in \
: ((TR_Socket)(socket))->addr.info.sa_family == AF_INET6 \
? ((TR_Socket)(socket))->addr.in6 \
: NULL)
#define TR_socketAddr(socket) \
((unsigned char *)&((TR_Socket)(socket))->addr)
#define TR_socketAddrlen(socket) (((TR_Socket)(socket))->addrlen)
#define TR_socketHandle(socket) (((TR_Socket)(socket))->handle)

Loading…
Cancel
Save