From e41eb8f0cee0b0b5959d9fdc7d59b8bf55a77a66 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sat, 2 Mar 2019 15:44:52 +0000 Subject: [PATCH] defect 189753: Inferred misuse of enum --- imap/imap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/imap/imap.c b/imap/imap.c index 42d1cbce0..017a389eb 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -871,18 +871,18 @@ int imap_open_connection(struct ImapAccountData *adata) /* Attempt STARTTLS if available and desired. */ if (!adata->conn->ssf && (C_SslForceTls || (adata->capabilities & IMAP_CAP_STARTTLS))) { - int rc; + enum QuadOption ans; if (C_SslForceTls) - rc = MUTT_YES; - else if ((rc = query_quadoption(C_SslStarttls, - _("Secure connection with TLS?"))) == MUTT_ABORT) + ans = MUTT_YES; + else if ((ans = query_quadoption(C_SslStarttls, + _("Secure connection with TLS?"))) == MUTT_ABORT) { goto err_close_conn; } - if (rc == MUTT_YES) + if (ans == MUTT_YES) { - rc = imap_exec(adata, "STARTTLS", 0); + enum ImapExecResult rc = imap_exec(adata, "STARTTLS", 0); if (rc == IMAP_EXEC_FATAL) goto bail; if (rc != IMAP_EXEC_ERROR) -- 2.40.0