From: Fabian Keil <fk@fabiankeil.de>
Date: Sun, 27 Mar 2011 14:03:43 +0000 (+0000)
Subject: In rfc2553_connect_to(), initialize socket_error to 0
X-Git-Tag: v_3_0_18~275
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/developer-manual/man-page/static/diff?a=commitdiff_plain;h=9bf8d4c93f81eefe159d17d42232dcd3fa2a86f4;p=privoxy.git

In rfc2553_connect_to(), initialize socket_error to 0

There are a couple of fringe situations where it isn't properly set yet.
---

diff --git a/jbsockets.c b/jbsockets.c
index 66078bdf..103a2b97 100644
--- a/jbsockets.c
+++ b/jbsockets.c
@@ -1,4 +1,4 @@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.94 2011/03/27 14:02:53 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.95 2011/03/27 14:03:25 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@ -185,7 +185,12 @@ static jb_socket rfc2553_connect_to(const char *host, int portnum, struct client
    int   flags;
 #endif
    int connect_failed;
-   int socket_error;
+   /*
+    * XXX: Initializeing it here is only necessary
+    *      because not all situations are properly
+    *      covered yet.
+    */
+   int socket_error = 0;
 
 #ifdef FEATURE_ACL
    struct access_control_addr dst[1];