Variable type cleanups to please the picky MIPSPro compiler.
This commit is contained in:
Родитель
f05d47ddd6
Коммит
090b89cc76
|
@ -219,7 +219,7 @@ int waitconnect(curl_socket_t sockfd, /* socket */
|
||||||
FD_ZERO(&errfd);
|
FD_ZERO(&errfd);
|
||||||
FD_SET(sockfd, &errfd);
|
FD_SET(sockfd, &errfd);
|
||||||
|
|
||||||
interval.tv_sec = timeout_msec/1000;
|
interval.tv_sec = (int)(timeout_msec/1000);
|
||||||
timeout_msec -= interval.tv_sec*1000;
|
timeout_msec -= interval.tv_sec*1000;
|
||||||
|
|
||||||
interval.tv_usec = timeout_msec*1000;
|
interval.tv_usec = timeout_msec*1000;
|
||||||
|
@ -674,7 +674,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
||||||
*connected = FALSE; /* default to not connected */
|
*connected = FALSE; /* default to not connected */
|
||||||
|
|
||||||
if(data->set.timeout || data->set.connecttimeout) {
|
if(data->set.timeout || data->set.connecttimeout) {
|
||||||
double has_passed;
|
long has_passed;
|
||||||
|
|
||||||
/* Evaluate in milliseconds how much time that has passed */
|
/* Evaluate in milliseconds how much time that has passed */
|
||||||
has_passed = Curl_tvdiff(Curl_tvnow(), data->progress.start);
|
has_passed = Curl_tvdiff(Curl_tvnow(), data->progress.start);
|
||||||
|
@ -696,7 +696,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
||||||
timeout_ms = data->set.connecttimeout*1000;
|
timeout_ms = data->set.connecttimeout*1000;
|
||||||
|
|
||||||
/* subtract the passed time */
|
/* subtract the passed time */
|
||||||
timeout_ms -= (long)has_passed;
|
timeout_ms -= has_passed;
|
||||||
|
|
||||||
if(timeout_ms < 0) {
|
if(timeout_ms < 0) {
|
||||||
/* a precaution, no need to continue if time already is up */
|
/* a precaution, no need to continue if time already is up */
|
||||||
|
|
|
@ -39,14 +39,15 @@
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
|
||||||
char *curl_escape(const char *string, int length)
|
char *curl_escape(const char *string, int inlength)
|
||||||
{
|
{
|
||||||
size_t alloc = (length?(size_t)length:strlen(string))+1;
|
size_t alloc = (inlength?(size_t)inlength:strlen(string))+1;
|
||||||
char *ns;
|
char *ns;
|
||||||
char *testing_ptr = NULL;
|
char *testing_ptr = NULL;
|
||||||
unsigned char in;
|
unsigned char in;
|
||||||
size_t newlen = alloc;
|
size_t newlen = alloc;
|
||||||
int strindex=0;
|
int strindex=0;
|
||||||
|
size_t length;
|
||||||
|
|
||||||
ns = malloc(alloc);
|
ns = malloc(alloc);
|
||||||
if(!ns)
|
if(!ns)
|
||||||
|
|
|
@ -633,7 +633,7 @@ static int Store_SSL_Session(struct connectdata *conn,
|
||||||
int i;
|
int i;
|
||||||
struct SessionHandle *data=conn->data; /* the mother of all structs */
|
struct SessionHandle *data=conn->data; /* the mother of all structs */
|
||||||
struct curl_ssl_session *store = &data->state.session[0];
|
struct curl_ssl_session *store = &data->state.session[0];
|
||||||
int oldest_age=data->state.session[0].age; /* zero if unused */
|
long oldest_age=data->state.session[0].age; /* zero if unused */
|
||||||
char *clone_host;
|
char *clone_host;
|
||||||
|
|
||||||
clone_host = strdup(conn->host.name);
|
clone_host = strdup(conn->host.name);
|
||||||
|
@ -1351,7 +1351,7 @@ Curl_SSLConnect(struct connectdata *conn,
|
||||||
/* we have been connected fine, get out of the connect loop */
|
/* we have been connected fine, get out of the connect loop */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
interval.tv_sec = timeout_ms/1000;
|
interval.tv_sec = (int)(timeout_ms/1000);
|
||||||
timeout_ms -= interval.tv_sec*1000;
|
timeout_ms -= interval.tv_sec*1000;
|
||||||
|
|
||||||
interval.tv_usec = timeout_ms*1000;
|
interval.tv_usec = timeout_ms*1000;
|
||||||
|
|
|
@ -120,7 +120,8 @@ static void set_local_option(struct connectdata *, int cmd, int option);
|
||||||
static void set_remote_option(struct connectdata *, int cmd, int option);
|
static void set_remote_option(struct connectdata *, int cmd, int option);
|
||||||
|
|
||||||
static void printsub(struct SessionHandle *data,
|
static void printsub(struct SessionHandle *data,
|
||||||
int direction, unsigned char *pointer, int length);
|
int direction, unsigned char *pointer,
|
||||||
|
size_t length);
|
||||||
static void suboption(struct connectdata *);
|
static void suboption(struct connectdata *);
|
||||||
|
|
||||||
/* For negotiation compliant to RFC 1143 */
|
/* For negotiation compliant to RFC 1143 */
|
||||||
|
@ -663,9 +664,9 @@ void rec_dont(struct connectdata *conn, int option)
|
||||||
static void printsub(struct SessionHandle *data,
|
static void printsub(struct SessionHandle *data,
|
||||||
int direction, /* '<' or '>' */
|
int direction, /* '<' or '>' */
|
||||||
unsigned char *pointer, /* where suboption data is */
|
unsigned char *pointer, /* where suboption data is */
|
||||||
int length) /* length of suboption data */
|
size_t length) /* length of suboption data */
|
||||||
{
|
{
|
||||||
int i = 0;
|
unsigned int i = 0;
|
||||||
|
|
||||||
if (data->set.verbose)
|
if (data->set.verbose)
|
||||||
{
|
{
|
||||||
|
|
|
@ -253,7 +253,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||||
/* This is where we loop until we have read everything there is to
|
/* This is where we loop until we have read everything there is to
|
||||||
read or we get a EWOULDBLOCK */
|
read or we get a EWOULDBLOCK */
|
||||||
do {
|
do {
|
||||||
int buffersize = data->set.buffer_size?
|
size_t buffersize = data->set.buffer_size?
|
||||||
data->set.buffer_size:BUFSIZE -1;
|
data->set.buffer_size:BUFSIZE -1;
|
||||||
|
|
||||||
/* receive data from the network! */
|
/* receive data from the network! */
|
||||||
|
@ -303,8 +303,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||||
|
|
||||||
/* header line within buffer loop */
|
/* header line within buffer loop */
|
||||||
do {
|
do {
|
||||||
int hbufp_index;
|
size_t hbufp_index;
|
||||||
int rest_length;
|
size_t rest_length;
|
||||||
size_t full_length;
|
size_t full_length;
|
||||||
int writetype;
|
int writetype;
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (('\n' == *k->p) || ('\r' == *k->p)) {
|
if (('\n' == *k->p) || ('\r' == *k->p)) {
|
||||||
int headerlen;
|
size_t headerlen;
|
||||||
/* Zero-length header line means end of headers! */
|
/* Zero-length header line means end of headers! */
|
||||||
|
|
||||||
if ('\r' == *k->p)
|
if ('\r' == *k->p)
|
||||||
|
@ -1264,7 +1264,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ms = Curl_tvdiff(k->now, k->start100);
|
long ms = Curl_tvdiff(k->now, k->start100);
|
||||||
if(ms > CURL_TIMEOUT_EXPECT_100) {
|
if(ms > CURL_TIMEOUT_EXPECT_100) {
|
||||||
/* we've waited long enough, continue anyway */
|
/* we've waited long enough, continue anyway */
|
||||||
k->write_after_100_header = FALSE;
|
k->write_after_100_header = FALSE;
|
||||||
|
|
|
@ -578,7 +578,7 @@ struct connectdata {
|
||||||
|
|
||||||
/* 'upload_present' is used to keep a byte counter of how much data there is
|
/* 'upload_present' is used to keep a byte counter of how much data there is
|
||||||
still left in the buffer, aimed for upload. */
|
still left in the buffer, aimed for upload. */
|
||||||
int upload_present;
|
ssize_t upload_present;
|
||||||
|
|
||||||
/* 'upload_fromhere' is used as a read-pointer when we uploaded parts of a
|
/* 'upload_fromhere' is used as a read-pointer when we uploaded parts of a
|
||||||
buffer, so the next read should read from where this pointer points to,
|
buffer, so the next read should read from where this pointer points to,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче