]> granicus.if.org Git - curl/commitdiff
don't log failed socket() calls
authorDaniel Stenberg <daniel@haxx.se>
Thu, 13 Nov 2003 07:33:51 +0000 (07:33 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 13 Nov 2003 07:33:51 +0000 (07:33 +0000)
lib/memdebug.c

index 83cc5d30716df086e6aba1850945b6704f47c801..ba3c964c9e9449ca30627f0d6008cb5789be1534 100644 (file)
@@ -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;