Skip to content

Commit

Permalink
Multiple 'RCPT TO': Fix boolean expressions fo C89 (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
volpav committed Jan 15, 2020
1 parent 1d5936d commit 089704f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/smtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,15 +915,17 @@ static CURLcode smtp_state_rcpt_resp(struct connectdata *conn, int smtpcode,
CURLcode result = CURLE_OK;
struct Curl_easy *data = conn->data;
struct SMTP *smtp = data->req.protop;
bool is_smtp_err = FALSE;
bool is_smtp_blocking_err = FALSE;

(void)instate; /* no use for this yet */

bool is_smtp_err = smtpcode/100 != 2 ? TRUE : FALSE;
is_smtp_err = (smtpcode/100 != 2) ? TRUE : FALSE;

/* If there's multiple "RCPT TO" to be issued, it's possible to ignore errors
and proceed with only the valid addresses. */
bool is_smtp_blocking_err =
is_smtp_err && !data->set.mail_rcpt_ignore_invalid ? TRUE : FALSE;
is_smtp_blocking_err =
(is_smtp_err && !data->set.mail_rcpt_ignore_invalid) ? TRUE : FALSE;

if(is_smtp_err) {
/* Remembering the last failure which we can report if all "RCPT TO" have
Expand Down

0 comments on commit 089704f

Please sign in to comment.