Loading lib/ftp.c +2 −3 Original line number Diff line number Diff line Loading @@ -2662,9 +2662,8 @@ CURLcode ftp_regular_transfer(struct connectdata *conn) /* we skip empty path components, like "x//y" since the FTP command CWD requires a parameter and a non-existant parameter a) doesn't work on many servers and b) has no effect on the others. */ ftp->dirs[ftp->dirdepth] = curl_unescape(cur_pos - absolute_dir, slash_pos - cur_pos + absolute_dir); int len = (int)(slash_pos - cur_pos + absolute_dir); ftp->dirs[ftp->dirdepth] = curl_unescape(cur_pos - absolute_dir, len); if (!ftp->dirs[ftp->dirdepth]) { /* run out of memory ... */ failf(data, "no memory"); Loading lib/url.c +15 −16 Original line number Diff line number Diff line Loading @@ -151,11 +151,11 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by #include "memdebug.h" /* Local static prototypes */ static int ConnectionKillOne(struct SessionHandle *data); static long ConnectionKillOne(struct SessionHandle *data); static bool ConnectionExists(struct SessionHandle *data, struct connectdata *needle, struct connectdata **usethis); static unsigned int ConnectionStore(struct SessionHandle *data, static long ConnectionStore(struct SessionHandle *data, struct connectdata *conn); static bool safe_strequal(char* str1, char* str2); Loading Loading @@ -411,17 +411,16 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) { long newconnects= va_arg(param, long); struct connectdata **newptr; long i; if(newconnects < data->state.numconnects) { /* Since this number is *decreased* from the existing number, we must close the possibly open connections that live on the indexes that are being removed! */ int i; for(i=newconnects; i< data->state.numconnects; i++) Curl_disconnect(data->state.connects[i]); } if(newconnects) { int i; newptr= (struct connectdata **) realloc(data->state.connects, sizeof(struct connectdata *) * newconnects); Loading Loading @@ -577,7 +576,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) * This is the value to compare with the remote document with the * method set with CURLOPT_TIMECONDITION */ data->set.timevalue = va_arg(param, long); data->set.timevalue = (time_t)va_arg(param, long); break; case CURLOPT_SSLVERSION: /* Loading Loading @@ -1633,14 +1632,14 @@ ConnectionExists(struct SessionHandle *data, * should take the previously set policy into account when deciding which * of the connections to kill. */ static int static long ConnectionKillOne(struct SessionHandle *data) { long i; struct connectdata *conn; int highscore=-1; int connindex=-1; int score; long highscore=-1; long connindex=-1; long score; struct timeval now; now = Curl_tvnow(); Loading Loading @@ -1697,7 +1696,7 @@ ConnectionKillOne(struct SessionHandle *data) * The given connection should be unique. That must've been checked prior to * this call. */ static unsigned int static long ConnectionStore(struct SessionHandle *data, struct connectdata *conn) { Loading Loading @@ -1787,8 +1786,8 @@ static int handleSock5Proxy(const char *proxy_name, /* Needs user name and password */ int userlen, pwlen, len; userlen = strlen(proxy_name); pwlen = proxy_password?strlen(proxy_password):0; userlen = (int)strlen(proxy_name); pwlen = proxy_password?(int)strlen(proxy_password):0; /* username/password request looks like * +----+------+----------+------+----------+ Loading Loading @@ -2108,7 +2107,7 @@ static CURLcode CreateConnection(struct SessionHandle *data, CURLcode result=CURLE_OK; struct connectdata *conn; struct connectdata *conn_temp; int urllen; size_t urllen; struct Curl_dns_entry *hostaddr; #ifdef HAVE_ALARM unsigned int prev_alarm=0; Loading Loading @@ -2407,7 +2406,7 @@ static CURLcode CreateConnection(struct SessionHandle *data, nope=no_proxy?strtok_r(no_proxy, ", ", &no_proxy_tok_buf):NULL; while(nope) { unsigned int namelen; size_t namelen; char *endptr = strchr(conn->host.name, ':'); if(endptr) namelen=endptr-conn->host.name; Loading Loading @@ -3290,7 +3289,7 @@ static CURLcode CreateConnection(struct SessionHandle *data, failf(data, "Previous alarm fired off!"); } else alarm(alarm_set); alarm((unsigned int)alarm_set); } else alarm(0); /* just shut it off */ Loading lib/urldata.h +1 −1 Original line number Diff line number Diff line Loading @@ -876,7 +876,7 @@ struct UserDefined { struct curl_slist *http200aliases; /* linked list of aliases for http200 */ int ip_version; long ip_version; curl_off_t max_filesize; /* Maximum file size to download */ Loading Loading
lib/ftp.c +2 −3 Original line number Diff line number Diff line Loading @@ -2662,9 +2662,8 @@ CURLcode ftp_regular_transfer(struct connectdata *conn) /* we skip empty path components, like "x//y" since the FTP command CWD requires a parameter and a non-existant parameter a) doesn't work on many servers and b) has no effect on the others. */ ftp->dirs[ftp->dirdepth] = curl_unescape(cur_pos - absolute_dir, slash_pos - cur_pos + absolute_dir); int len = (int)(slash_pos - cur_pos + absolute_dir); ftp->dirs[ftp->dirdepth] = curl_unescape(cur_pos - absolute_dir, len); if (!ftp->dirs[ftp->dirdepth]) { /* run out of memory ... */ failf(data, "no memory"); Loading
lib/url.c +15 −16 Original line number Diff line number Diff line Loading @@ -151,11 +151,11 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by #include "memdebug.h" /* Local static prototypes */ static int ConnectionKillOne(struct SessionHandle *data); static long ConnectionKillOne(struct SessionHandle *data); static bool ConnectionExists(struct SessionHandle *data, struct connectdata *needle, struct connectdata **usethis); static unsigned int ConnectionStore(struct SessionHandle *data, static long ConnectionStore(struct SessionHandle *data, struct connectdata *conn); static bool safe_strequal(char* str1, char* str2); Loading Loading @@ -411,17 +411,16 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) { long newconnects= va_arg(param, long); struct connectdata **newptr; long i; if(newconnects < data->state.numconnects) { /* Since this number is *decreased* from the existing number, we must close the possibly open connections that live on the indexes that are being removed! */ int i; for(i=newconnects; i< data->state.numconnects; i++) Curl_disconnect(data->state.connects[i]); } if(newconnects) { int i; newptr= (struct connectdata **) realloc(data->state.connects, sizeof(struct connectdata *) * newconnects); Loading Loading @@ -577,7 +576,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) * This is the value to compare with the remote document with the * method set with CURLOPT_TIMECONDITION */ data->set.timevalue = va_arg(param, long); data->set.timevalue = (time_t)va_arg(param, long); break; case CURLOPT_SSLVERSION: /* Loading Loading @@ -1633,14 +1632,14 @@ ConnectionExists(struct SessionHandle *data, * should take the previously set policy into account when deciding which * of the connections to kill. */ static int static long ConnectionKillOne(struct SessionHandle *data) { long i; struct connectdata *conn; int highscore=-1; int connindex=-1; int score; long highscore=-1; long connindex=-1; long score; struct timeval now; now = Curl_tvnow(); Loading Loading @@ -1697,7 +1696,7 @@ ConnectionKillOne(struct SessionHandle *data) * The given connection should be unique. That must've been checked prior to * this call. */ static unsigned int static long ConnectionStore(struct SessionHandle *data, struct connectdata *conn) { Loading Loading @@ -1787,8 +1786,8 @@ static int handleSock5Proxy(const char *proxy_name, /* Needs user name and password */ int userlen, pwlen, len; userlen = strlen(proxy_name); pwlen = proxy_password?strlen(proxy_password):0; userlen = (int)strlen(proxy_name); pwlen = proxy_password?(int)strlen(proxy_password):0; /* username/password request looks like * +----+------+----------+------+----------+ Loading Loading @@ -2108,7 +2107,7 @@ static CURLcode CreateConnection(struct SessionHandle *data, CURLcode result=CURLE_OK; struct connectdata *conn; struct connectdata *conn_temp; int urllen; size_t urllen; struct Curl_dns_entry *hostaddr; #ifdef HAVE_ALARM unsigned int prev_alarm=0; Loading Loading @@ -2407,7 +2406,7 @@ static CURLcode CreateConnection(struct SessionHandle *data, nope=no_proxy?strtok_r(no_proxy, ", ", &no_proxy_tok_buf):NULL; while(nope) { unsigned int namelen; size_t namelen; char *endptr = strchr(conn->host.name, ':'); if(endptr) namelen=endptr-conn->host.name; Loading Loading @@ -3290,7 +3289,7 @@ static CURLcode CreateConnection(struct SessionHandle *data, failf(data, "Previous alarm fired off!"); } else alarm(alarm_set); alarm((unsigned int)alarm_set); } else alarm(0); /* just shut it off */ Loading
lib/urldata.h +1 −1 Original line number Diff line number Diff line Loading @@ -876,7 +876,7 @@ struct UserDefined { struct curl_slist *http200aliases; /* linked list of aliases for http200 */ int ip_version; long ip_version; curl_off_t max_filesize; /* Maximum file size to download */ Loading