mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
ftp/imap/pop3/smtp: Fixed compilation warning when /Wall enabled
warning C4706: assignment within conditional expression
This commit is contained in:
parent
4ff2fbd1d5
commit
c142e73142
@ -1300,11 +1300,13 @@ CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl,
|
|||||||
|
|
||||||
if(strnequal(value, "*", len))
|
if(strnequal(value, "*", len))
|
||||||
sasl->prefmech = SASL_AUTH_DEFAULT;
|
sasl->prefmech = SASL_AUTH_DEFAULT;
|
||||||
else if((mechbit = Curl_sasl_decode_mech(value, len, &mechlen)) &&
|
else {
|
||||||
mechlen == len)
|
mechbit = Curl_sasl_decode_mech(value, len, &mechlen);
|
||||||
sasl->prefmech |= mechbit;
|
if(mechbit && mechlen == len)
|
||||||
else
|
sasl->prefmech |= mechbit;
|
||||||
result = CURLE_URL_MALFORMAT;
|
else
|
||||||
|
result = CURLE_URL_MALFORMAT;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1600,7 +1602,8 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
|
|||||||
newstate = SASL_DIGESTMD5_RESP;
|
newstate = SASL_DIGESTMD5_RESP;
|
||||||
break;
|
break;
|
||||||
case SASL_DIGESTMD5_RESP:
|
case SASL_DIGESTMD5_RESP:
|
||||||
if(!(resp = strdup("")))
|
resp = strdup("");
|
||||||
|
if(!resp)
|
||||||
result = CURLE_OUT_OF_MEMORY;
|
result = CURLE_OUT_OF_MEMORY;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -155,8 +155,9 @@ static CURLcode ftp_dophase_done(struct connectdata *conn,
|
|||||||
bool connected);
|
bool connected);
|
||||||
|
|
||||||
/* easy-to-use macro: */
|
/* easy-to-use macro: */
|
||||||
#define PPSENDF(x,y,z) if((result = Curl_pp_sendf(x,y,z))) \
|
#define PPSENDF(x,y,z) result = Curl_pp_sendf(x,y,z); \
|
||||||
return result
|
if(result) \
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -910,8 +910,8 @@ static CURLcode imap_state_capability_resp(struct connectdata *conn,
|
|||||||
wordlen -= 5;
|
wordlen -= 5;
|
||||||
|
|
||||||
/* Test the word for a matching authentication mechanism */
|
/* Test the word for a matching authentication mechanism */
|
||||||
if((mechbit = Curl_sasl_decode_mech(line, wordlen, &llen)) &&
|
mechbit = Curl_sasl_decode_mech(line, wordlen, &llen);
|
||||||
llen == wordlen)
|
if(mechbit && llen == wordlen)
|
||||||
imapc->sasl.authmechs |= mechbit;
|
imapc->sasl.authmechs |= mechbit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -753,8 +753,8 @@ static CURLcode pop3_state_capa_resp(struct connectdata *conn, int pop3code,
|
|||||||
wordlen++;
|
wordlen++;
|
||||||
|
|
||||||
/* Test the word for a matching authentication mechanism */
|
/* Test the word for a matching authentication mechanism */
|
||||||
if((mechbit = Curl_sasl_decode_mech(line, wordlen, &llen)) &&
|
mechbit = Curl_sasl_decode_mech(line, wordlen, &llen);
|
||||||
llen == wordlen)
|
if(mechbit && llen == wordlen)
|
||||||
pop3c->sasl.authmechs |= mechbit;
|
pop3c->sasl.authmechs |= mechbit;
|
||||||
|
|
||||||
line += wordlen;
|
line += wordlen;
|
||||||
|
@ -770,8 +770,8 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode,
|
|||||||
wordlen++;
|
wordlen++;
|
||||||
|
|
||||||
/* Test the word for a matching authentication mechanism */
|
/* Test the word for a matching authentication mechanism */
|
||||||
if((mechbit = Curl_sasl_decode_mech(line, wordlen, &llen)) &&
|
mechbit = Curl_sasl_decode_mech(line, wordlen, &llen);
|
||||||
llen == wordlen)
|
if(mechbit && llen == wordlen)
|
||||||
smtpc->sasl.authmechs |= mechbit;
|
smtpc->sasl.authmechs |= mechbit;
|
||||||
|
|
||||||
line += wordlen;
|
line += wordlen;
|
||||||
|
Loading…
Reference in New Issue
Block a user