summaryrefslogtreecommitdiff
path: root/lib/curl_sasl.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2016-03-19 17:15:53 +0000
committerSteve Holme <steve_holme@hotmail.com>2016-03-19 17:15:53 +0000
commitc142e73142e377f9bcd75fed0a558ce30323e98c (patch)
tree3c26f8a4139d9cd87491b3b4b1810faf3e6a2e4b /lib/curl_sasl.c
parent4ff2fbd1d5d743556627816f4727c499c480d633 (diff)
downloadcurl-c142e73142e377f9bcd75fed0a558ce30323e98c.tar.gz
ftp/imap/pop3/smtp: Fixed compilation warning when /Wall enabled
warning C4706: assignment within conditional expression
Diffstat (limited to 'lib/curl_sasl.c')
-rw-r--r--lib/curl_sasl.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
index aac2bcd29..945d75232 100644
--- a/lib/curl_sasl.c
+++ b/lib/curl_sasl.c
@@ -1300,11 +1300,13 @@ CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl,
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;
}
@@ -1600,7 +1602,8 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
newstate = SASL_DIGESTMD5_RESP;
break;
case SASL_DIGESTMD5_RESP:
- if(!(resp = strdup("")))
+ resp = strdup("");
+ if(!resp)
result = CURLE_OUT_OF_MEMORY;
break;
#endif