aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-09-04 22:32:57 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-09-04 22:33:29 +0200
commite9de8e78f0a73c5fa7e0a7aba6b85f3d8afa76d9 (patch)
tree4d28554b767e917ea412bb81309b920fd4f93c8a
parent2eabb7d590aaa14c211e3a306582ff36fc3fc0f5 (diff)
SASL: fix compiler warnings
comparison between signed and unsigned integer expressions suggest parentheses around '&&' within '||' (twice)
-rw-r--r--lib/curl_sasl.h2
-rw-r--r--lib/imap.c6
-rw-r--r--lib/smtp.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h
index 964e94cad..1cac8fd63 100644
--- a/lib/curl_sasl.h
+++ b/lib/curl_sasl.h
@@ -36,7 +36,7 @@
/* Authentication mechanism values */
#define SASL_AUTH_NONE 0
-#define SASL_AUTH_ANY ~0
+#define SASL_AUTH_ANY ~0U
/* This is used to generate a base64 encoded PLAIN authentication message */
CURLcode Curl_sasl_create_plain_message(struct SessionHandle *data,
diff --git a/lib/imap.c b/lib/imap.c
index 6b6d4ce45..220708785 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -579,9 +579,9 @@ static CURLcode imap_perform_authenticate(struct connectdata *conn)
}
else
#endif
- if((imapc->authmechs & SASL_MECH_XOAUTH2) &&
- (imapc->prefmech & SASL_MECH_XOAUTH2) &&
- (imapc->prefmech != SASL_AUTH_ANY) || conn->xoauth2_bearer) {
+ if(((imapc->authmechs & SASL_MECH_XOAUTH2) &&
+ (imapc->prefmech & SASL_MECH_XOAUTH2) &&
+ (imapc->prefmech != SASL_AUTH_ANY)) || conn->xoauth2_bearer) {
mech = "XOAUTH2";
state1 = IMAP_AUTHENTICATE_XOAUTH2;
state2 = IMAP_AUTHENTICATE_FINAL;
diff --git a/lib/smtp.c b/lib/smtp.c
index c3650e1d9..7ba2ba464 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -500,9 +500,9 @@ static CURLcode smtp_perform_authenticate(struct connectdata *conn)
}
else
#endif
- if((smtpc->authmechs & SASL_MECH_XOAUTH2) &&
- (smtpc->prefmech & SASL_MECH_XOAUTH2) &&
- (smtpc->prefmech != SASL_AUTH_ANY) || conn->xoauth2_bearer) {
+ if(((smtpc->authmechs & SASL_MECH_XOAUTH2) &&
+ (smtpc->prefmech & SASL_MECH_XOAUTH2) &&
+ (smtpc->prefmech != SASL_AUTH_ANY)) || conn->xoauth2_bearer) {
mech = "XOAUTH2";
state1 = SMTP_AUTH_XOAUTH2;
state2 = SMTP_AUTH_FINAL;