aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-10-19 18:20:47 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-10-19 18:20:47 +0000
commit80d0dcc9a3124dcecc9d1f7296f2ac429bc7d704 (patch)
tree99c0ab449cf73f4f8169fbf79875ebd0a76de233
parentd51ad518c4c890d69c5d720c52e2d68d3e26cb76 (diff)
clarified an argument's situation due to a false positive alert pointed out
by coverity.com
-rw-r--r--lib/url.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/url.c b/lib/url.c
index 45567b6a0..040a64cd1 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -4355,8 +4355,8 @@ static CURLcode create_conn(struct SessionHandle *data,
*/
static CURLcode setup_conn(struct connectdata *conn,
- struct Curl_dns_entry *hostaddr,
- bool *protocol_done)
+ struct Curl_dns_entry *hostaddr,
+ bool *protocol_done)
{
CURLcode result=CURLE_OK;
struct SessionHandle *data = conn->data;
@@ -4402,7 +4402,12 @@ static CURLcode setup_conn(struct connectdata *conn,
if(CURL_SOCKET_BAD == conn->sock[FIRSTSOCKET]) {
bool connected = FALSE;
- /* Connect only if not already connected! */
+ /* Connect only if not already connected!
+ *
+ * NOTE: hostaddr can be NULL when passed to this function, but that is
+ * only for the case where we re-use an existing connection and thus
+ * this code section will not be reached with hostaddr == NULL.
+ */
result = ConnectPlease(data, conn, hostaddr, &connected);
if(connected) {