if(strnequal(value, "*", len))
sasl->prefmech = SASL_AUTH_DEFAULT;
- else if((mechbit = Curl_sasl_decode_mech(value, len, &mechlen)) &&
- mechlen == len)
- sasl->prefmech |= mechbit;
- else
- result = CURLE_URL_MALFORMAT;
+ else {
+ mechbit = Curl_sasl_decode_mech(value, len, &mechlen);
+ if(mechbit && mechlen == len)
+ sasl->prefmech |= mechbit;
+ else
+ result = CURLE_URL_MALFORMAT;
+ }
return result;
}
newstate = SASL_DIGESTMD5_RESP;
break;
case SASL_DIGESTMD5_RESP:
- if(!(resp = strdup("")))
+ resp = strdup("");
+ if(!resp)
result = CURLE_OUT_OF_MEMORY;
break;
#endif
bool connected);
/* easy-to-use macro: */
-#define PPSENDF(x,y,z) if((result = Curl_pp_sendf(x,y,z))) \
- return result
+#define PPSENDF(x,y,z) result = Curl_pp_sendf(x,y,z); \
+ if(result) \
+ return result
/*
wordlen -= 5;
/* Test the word for a matching authentication mechanism */
- if((mechbit = Curl_sasl_decode_mech(line, wordlen, &llen)) &&
- llen == wordlen)
+ mechbit = Curl_sasl_decode_mech(line, wordlen, &llen);
+ if(mechbit && llen == wordlen)
imapc->sasl.authmechs |= mechbit;
}
wordlen++;
/* Test the word for a matching authentication mechanism */
- if((mechbit = Curl_sasl_decode_mech(line, wordlen, &llen)) &&
- llen == wordlen)
+ mechbit = Curl_sasl_decode_mech(line, wordlen, &llen);
+ if(mechbit && llen == wordlen)
pop3c->sasl.authmechs |= mechbit;
line += wordlen;
wordlen++;
/* Test the word for a matching authentication mechanism */
- if((mechbit = Curl_sasl_decode_mech(line, wordlen, &llen)) &&
- llen == wordlen)
+ mechbit = Curl_sasl_decode_mech(line, wordlen, &llen);
+ if(mechbit && llen == wordlen)
smtpc->sasl.authmechs |= mechbit;
line += wordlen;