fix compiler warning
This commit is contained in:
parent
1171bc5c8a
commit
dc3e7df1c9
@ -634,7 +634,7 @@ CURL *curl_easy_duphandle(CURL *incurl)
|
|||||||
if(NULL == outcurl)
|
if(NULL == outcurl)
|
||||||
return NULL; /* failure */
|
return NULL; /* failure */
|
||||||
|
|
||||||
do {
|
for(;;) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We setup a few buffers we need. We should probably make them
|
* We setup a few buffers we need. We should probably make them
|
||||||
@ -720,8 +720,9 @@ CURL *curl_easy_duphandle(CURL *incurl)
|
|||||||
outcurl->magic = CURLEASY_MAGIC_NUMBER;
|
outcurl->magic = CURLEASY_MAGIC_NUMBER;
|
||||||
|
|
||||||
fail = FALSE; /* we reach this point and thus we are OK */
|
fail = FALSE; /* we reach this point and thus we are OK */
|
||||||
|
break;
|
||||||
|
|
||||||
} while(0);
|
}
|
||||||
|
|
||||||
if(fail) {
|
if(fail) {
|
||||||
if(outcurl) {
|
if(outcurl) {
|
||||||
|
@ -1647,14 +1647,14 @@ int main(int argc, argv_item_t argv[])
|
|||||||
|
|
||||||
Curl_FormInit(&formread, form);
|
Curl_FormInit(&formread, form);
|
||||||
|
|
||||||
do {
|
for(;;) {
|
||||||
nread = Curl_FormReader(buffer, 1, sizeof(buffer),
|
nread = Curl_FormReader(buffer, 1, sizeof(buffer),
|
||||||
(FILE *)&formread);
|
(FILE *)&formread);
|
||||||
|
|
||||||
if(nread < 1)
|
if(nread < 1)
|
||||||
break;
|
break;
|
||||||
fwrite(buffer, nread, 1, stdout);
|
fwrite(buffer, nread, 1, stdout);
|
||||||
} while(1);
|
}
|
||||||
|
|
||||||
fprintf(stdout, "size: ");
|
fprintf(stdout, "size: ");
|
||||||
fprintf(stdout, "%" FORMAT_OFF_T, size);
|
fprintf(stdout, "%" FORMAT_OFF_T, size);
|
||||||
|
@ -196,7 +196,7 @@ static CURLcode handshake(struct connectdata *conn,
|
|||||||
int rc;
|
int rc;
|
||||||
int what;
|
int what;
|
||||||
|
|
||||||
while(1) {
|
for(;;) {
|
||||||
/* check allowed time left */
|
/* check allowed time left */
|
||||||
timeout_ms = Curl_timeleft(conn, NULL, duringconnect);
|
timeout_ms = Curl_timeleft(conn, NULL, duringconnect);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ Curl_HMAC_init(const HMAC_params * hashparams,
|
|||||||
|
|
||||||
/* Create HMAC context. */
|
/* Create HMAC context. */
|
||||||
i = sizeof *ctxt + 2 * hashparams->hmac_ctxtsize + hashparams->hmac_resultlen;
|
i = sizeof *ctxt + 2 * hashparams->hmac_ctxtsize + hashparams->hmac_resultlen;
|
||||||
ctxt = (HMAC_context *) malloc(i);
|
ctxt = malloc(i);
|
||||||
|
|
||||||
if(!ctxt)
|
if(!ctxt)
|
||||||
return ctxt;
|
return ctxt;
|
||||||
@ -85,9 +85,9 @@ Curl_HMAC_init(const HMAC_params * hashparams,
|
|||||||
(*hashparams->hmac_hinit)(ctxt->hmac_hashctxt2);
|
(*hashparams->hmac_hinit)(ctxt->hmac_hashctxt2);
|
||||||
|
|
||||||
for (i = 0; i < keylen; i++) {
|
for (i = 0; i < keylen; i++) {
|
||||||
b = *key ^ hmac_ipad;
|
b = (unsigned char)(*key ^ hmac_ipad);
|
||||||
(*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt1, &b, 1);
|
(*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt1, &b, 1);
|
||||||
b = *key++ ^ hmac_opad;
|
b = (unsigned char)(*key++ ^ hmac_opad);
|
||||||
(*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt2, &b, 1);
|
(*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt2, &b, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn,
|
|||||||
timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */
|
timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */
|
||||||
|
|
||||||
/* Wait for the name resolve query to complete. */
|
/* Wait for the name resolve query to complete. */
|
||||||
while(1) {
|
for(;;) {
|
||||||
struct timeval *tvp, tv, store;
|
struct timeval *tvp, tv, store;
|
||||||
long timediff;
|
long timediff;
|
||||||
int itimeout;
|
int itimeout;
|
||||||
|
@ -158,7 +158,7 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
|
|||||||
/* clear off any former leftovers and init to defaults */
|
/* clear off any former leftovers and init to defaults */
|
||||||
Curl_digest_cleanup_one(d);
|
Curl_digest_cleanup_one(d);
|
||||||
|
|
||||||
while(1) {
|
for(;;) {
|
||||||
char value[MAX_VALUE_LENGTH];
|
char value[MAX_VALUE_LENGTH];
|
||||||
char content[MAX_CONTENT_LENGTH];
|
char content[MAX_CONTENT_LENGTH];
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ Curl_polarssl_connect(struct connectdata *conn,
|
|||||||
ssl_set_dbg(&conn->ssl[sockindex].ssl, polarssl_debug, data);
|
ssl_set_dbg(&conn->ssl[sockindex].ssl, polarssl_debug, data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
do {
|
for(;;) {
|
||||||
if (!(ret = ssl_handshake(&conn->ssl[sockindex].ssl))) {
|
if (!(ret = ssl_handshake(&conn->ssl[sockindex].ssl))) {
|
||||||
break;
|
break;
|
||||||
} else if(ret != POLARSSL_ERR_NET_TRY_AGAIN) {
|
} else if(ret != POLARSSL_ERR_NET_TRY_AGAIN) {
|
||||||
@ -250,7 +250,7 @@ Curl_polarssl_connect(struct connectdata *conn,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (1);
|
}
|
||||||
|
|
||||||
infof(data, "PolarSSL: Handshake complete, cipher is %s\n",
|
infof(data, "PolarSSL: Handshake complete, cipher is %s\n",
|
||||||
ssl_get_cipher(&conn->ssl[sockindex].ssl));
|
ssl_get_cipher(&conn->ssl[sockindex].ssl));
|
||||||
|
@ -1049,7 +1049,7 @@ static int asn1_output(const ASN1_UTCTIME *tm,
|
|||||||
|
|
||||||
static int hostmatch(const char *hostname, const char *pattern)
|
static int hostmatch(const char *hostname, const char *pattern)
|
||||||
{
|
{
|
||||||
while(1) {
|
for(;;) {
|
||||||
char c = *pattern++;
|
char c = *pattern++;
|
||||||
|
|
||||||
if(c == '\0')
|
if(c == '\0')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user