Commit c142e731 authored by Steve Holme's avatar Steve Holme
Browse files

ftp/imap/pop3/smtp: Fixed compilation warning when /Wall enabled

warning C4706: assignment within conditional expression
parent 4ff2fbd1
Loading
Loading
Loading
Loading
+9 −6
Original line number Original line Diff line number Diff line
@@ -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);
    if(mechbit && mechlen == len)
      sasl->prefmech |= mechbit;
      sasl->prefmech |= mechbit;
    else
    else
      result = CURLE_URL_MALFORMAT;
      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
+3 −2
Original line number Original line Diff line number Diff line
@@ -155,7 +155,8 @@ 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); \
                        if(result)                     \
                          return result
                          return result




+2 −2
Original line number Original line Diff line number Diff line
@@ -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;
      }
      }


+2 −2
Original line number Original line Diff line number Diff line
@@ -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;
+2 −2
Original line number Original line Diff line number Diff line
@@ -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;