email: Optimised block_statemach() functions
Optimised the result test in each of the block_statemach() functions.
This commit is contained in:
@@ -1685,10 +1685,8 @@ static CURLcode imap_block_statemach(struct connectdata *conn)
|
|||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
struct imap_conn *imapc = &conn->proto.imapc;
|
struct imap_conn *imapc = &conn->proto.imapc;
|
||||||
|
|
||||||
while(imapc->state != IMAP_STOP) {
|
while(imapc->state != IMAP_STOP && !result) {
|
||||||
result = Curl_pp_statemach(&imapc->pp, TRUE);
|
result = Curl_pp_statemach(&imapc->pp, TRUE);
|
||||||
if(result)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -1262,10 +1262,8 @@ static CURLcode pop3_block_statemach(struct connectdata *conn)
|
|||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
struct pop3_conn *pop3c = &conn->proto.pop3c;
|
struct pop3_conn *pop3c = &conn->proto.pop3c;
|
||||||
|
|
||||||
while(pop3c->state != POP3_STOP) {
|
while(pop3c->state != POP3_STOP && !result) {
|
||||||
result = Curl_pp_statemach(&pop3c->pp, TRUE);
|
result = Curl_pp_statemach(&pop3c->pp, TRUE);
|
||||||
if(result)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -1254,10 +1254,8 @@ static CURLcode smtp_block_statemach(struct connectdata *conn)
|
|||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
struct smtp_conn *smtpc = &conn->proto.smtpc;
|
struct smtp_conn *smtpc = &conn->proto.smtpc;
|
||||||
|
|
||||||
while(smtpc->state != SMTP_STOP) {
|
while(smtpc->state != SMTP_STOP && !result) {
|
||||||
result = Curl_pp_statemach(&smtpc->pp, TRUE);
|
result = Curl_pp_statemach(&smtpc->pp, TRUE);
|
||||||
if(result)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user