diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2004-11-10 19:57:47 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2004-11-10 19:57:47 +0000 |
commit | 2ed8dc12cd5ffbbff9cd25e928a720be3596f2af (patch) | |
tree | 994d80cb32bb77ad0f380f9254a7e3171d2ec051 /ipv6-connect.c | |
parent | 13c27199231cbc2cc83969ada741b95be1cca4d3 (diff) | |
download | fetchmail-2ed8dc12cd5ffbbff9cd25e928a720be3596f2af.tar.gz fetchmail-2ed8dc12cd5ffbbff9cd25e928a720be3596f2af.tar.bz2 fetchmail-2ed8dc12cd5ffbbff9cd25e928a720be3596f2af.zip |
Clean up the horrible HAVE_[V]SNPRINTF mess, use Trio on systems that lack
real snprintf or vsnprintf.
svn path=/trunk/; revision=3996
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; }; |