aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-11-13 07:33:51 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-11-13 07:33:51 +0000
commit776f0bd95e92f72e16d9e836f92d83a313bbedd7 (patch)
tree3e39fb9f69c5168710b8ea56e17b8c81e11819b5
parentcd9aabb474ff90723d76d42c105288dcf4bffd1b (diff)
don't log failed socket() calls
-rw-r--r--lib/memdebug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 83cc5d307..ba3c964c9 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -204,7 +204,7 @@ void curl_dofree(void *ptr, int line, const char *source)
int curl_socket(int domain, int type, int protocol, int line, char *source)
{
int sockfd=(socket)(domain, type, protocol);
- if(logfile)
+ if(logfile && (sockfd!=-1))
fprintf(logfile, "FD %s:%d socket() = %d\n",
source, line, sockfd);
return sockfd;