diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-03-11 22:48:58 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-03-11 22:48:58 +0000 |
commit | 20b9ab49a75b14b6aad3c5c67d504f1bfd8e6bd5 (patch) | |
tree | 1b0d1aad3b01e140d162172778bfb17342df1208 /lib | |
parent | c8cd13337efcd45e918fab824b226e4ae6338ea0 (diff) |
can just as well NULLify the pointer in a single spot
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -4223,9 +4223,6 @@ CURLcode Curl_done(struct connectdata **connp, if(data->set.reuse_forbid || conn->bits.close) { CURLcode res2 = Curl_disconnect(conn); /* close the connection */ - *connp = NULL; /* to make the caller of this function better detect that - this was actually killed here */ - /* If we had an error already, make sure we return that one. But if we got a new error, return that. */ if(!result && res2) @@ -4240,12 +4237,13 @@ CURLcode Curl_done(struct connectdata **connp, infof(data, "Connection #%ld to host %s left intact\n", conn->connectindex, conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname); - - *connp = NULL; /* to make the caller of this function better detect that - this connection is handed over and no longer used from - this point on */ } + *connp = NULL; /* to make the caller of this function better detect that + this was either closed or handed over to the connection + cache here, and therefore cannot be used from this point on + */ + return result; } |