diff options
Diffstat (limited to 'ipv6-connect.c')
-rw-r--r-- | ipv6-connect.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/ipv6-connect.c b/ipv6-connect.c index 6064806c..6537984d 100644 --- a/ipv6-connect.c +++ b/ipv6-connect.c @@ -100,23 +100,15 @@ int inner_connect(struct addrinfo *ai, void *request, int requestlen, int (*tryi continue; if ((fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) { -#ifdef HAVE_SNPRINTF - snprintf(errorbuf, sizeof(errorbuf), -#else - sprintf(errorbuf, -#endif - "socket: %s(%d)", strerror(errno), errno); + snprintf(errorbuf, sizeof(errorbuf), "socket: %s(%d)", + strerror(errno), errno); error_callback(myname, errorbuf); continue; }; if (connect(fd, ai->ai_addr, ai->ai_addrlen) < 0) { -#ifdef HAVE_SNPRINTF - snprintf(errorbuf, sizeof(errorbuf), -#else - sprintf(errorbuf, -#endif - "connect: %s(%d)", strerror(errno), errno); + snprintf(errorbuf, sizeof(errorbuf), "connect: %s(%d)", + strerror(errno), errno); error_callback(myname, errorbuf); close(fd); /* just after a connect; no reads or writes yet */ continue; @@ -128,12 +120,7 @@ int inner_connect(struct addrinfo *ai, void *request, int requestlen, int (*tryi if (pai) *pai = ai; } else { -#ifdef HAVE_SNPRINTF - snprintf(errorbuf, sizeof(errorbuf), -#else - sprintf(errorbuf, -#endif - "no connections result"); + snprintf(errorbuf, sizeof(errorbuf), "no connections result"); error_callback(myname, errorbuf); fd = -1; }; |