summaryrefslogtreecommitdiff
path: root/src/tls_test.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-11-07 21:44:40 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-11-07 21:44:40 +0000
commitf281bf3b3b561b47ba80e7223602494069907a9d (patch)
tree06ec9e16b54f439b58883a05a35e3f348a4c3af8 /src/tls_test.c
parent172b4b7ed6f294f8bf549dc6f664b41cb5ddf586 (diff)
downloadgnutls-f281bf3b3b561b47ba80e7223602494069907a9d.tar.gz
*** empty log message ***
Diffstat (limited to 'src/tls_test.c')
-rw-r--r--src/tls_test.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/tls_test.c b/src/tls_test.c
index 491163e1b1..ed7159adbc 100644
--- a/src/tls_test.c
+++ b/src/tls_test.c
@@ -136,12 +136,6 @@ static const TLS_TEST tls_tests[] = {
static int tt = 0;
char* ip;
-#ifdef HAVE_INET_NTOP
-# define IP inet_ntop(AF_INET, &sa.sin_addr, buffer, MAX_BUF)
-#else
-# define IP inet_ntoa( ((struct sockaddr_in*)&sa)->sin_addr)
-#endif
-
#define CONNECT() \
sd = socket(AF_INET, SOCK_STREAM, 0); \
ERR(sd, "socket"); \
@@ -149,7 +143,7 @@ char* ip;
sa.sin_family = AF_INET; \
sa.sin_port = htons(port); \
sa.sin_addr.s_addr = *((unsigned int *) server_host->h_addr); \
- ip = IP; \
+ ip = inet_ntop(AF_INET, &sa.sin_addr, buffer, MAX_BUF); \
if (tt++ == 0) printf("Connecting to '%s:%d'...\n", ip, port); \
err = connect(sd, (SA *) & sa, sizeof(sa)); \
ERR(err, "connect")