summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-10-10 03:32:01 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-10-10 03:32:01 +0000
commit6d1b37b3da7728ebf3574160dedeb04bb94eba25 (patch)
treefc6a56fb41f9960eb15cf486196b16bdcf9965b2
parent34750cc738214008a6098e554584c2d88677ed92 (diff)
downloadgnurl-6d1b37b3da7728ebf3574160dedeb04bb94eba25.tar.gz
gnurl-6d1b37b3da7728ebf3574160dedeb04bb94eba25.tar.bz2
gnurl-6d1b37b3da7728ebf3574160dedeb04bb94eba25.zip
Prevent a longjmp warning by moving the rc assign within Curl_resolv().
Andy Cedilnik reported. Warning on HP-UX?
-rw-r--r--lib/hostip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 3db704f44..7bb8c966c 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -378,9 +378,7 @@ int Curl_resolv(struct connectdata *conn,
int wait;
struct SessionHandle *data = conn->data;
CURLcode result;
-
- /* default to failure */
- int rc = CURLRESOLV_ERROR;
+ int rc;
*entry = NULL;
#ifdef HAVE_SIGSETJMP
@@ -413,6 +411,8 @@ int Curl_resolv(struct connectdata *conn,
/* free the allocated entry_id again */
free(entry_id);
+ rc = CURLRESOLV_ERROR; /* default to failure */
+
if (!dns) {
/* The entry was not in the cache. Resolve it to IP address */