email: Removed hard returns from init functions

This commit is contained in:
Steve Holme
2013-03-09 22:25:40 +00:00
parent 136a3a0ee2
commit 059647f398
3 changed files with 9 additions and 6 deletions

View File

@@ -1752,16 +1752,17 @@ static CURLcode imap_block_statemach(struct connectdata *conn)
required */ required */
static CURLcode imap_init(struct connectdata *conn) static CURLcode imap_init(struct connectdata *conn)
{ {
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data;
struct IMAP *imap = data->state.proto.imap; struct IMAP *imap = data->state.proto.imap;
if(!imap) { if(!imap) {
imap = data->state.proto.imap = calloc(sizeof(struct IMAP), 1); imap = data->state.proto.imap = calloc(sizeof(struct IMAP), 1);
if(!imap) if(!imap)
return CURLE_OUT_OF_MEMORY; result = CURLE_OUT_OF_MEMORY;
} }
return CURLE_OK; return result;
} }
/* For the IMAP "protocol connect" and "doing" phases only */ /* For the IMAP "protocol connect" and "doing" phases only */

View File

@@ -1272,16 +1272,17 @@ static CURLcode pop3_block_statemach(struct connectdata *conn)
required */ required */
static CURLcode pop3_init(struct connectdata *conn) static CURLcode pop3_init(struct connectdata *conn)
{ {
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data;
struct POP3 *pop3 = data->state.proto.pop3; struct POP3 *pop3 = data->state.proto.pop3;
if(!pop3) { if(!pop3) {
pop3 = data->state.proto.pop3 = calloc(sizeof(struct POP3), 1); pop3 = data->state.proto.pop3 = calloc(sizeof(struct POP3), 1);
if(!pop3) if(!pop3)
return CURLE_OUT_OF_MEMORY; result = CURLE_OUT_OF_MEMORY;
} }
return CURLE_OK; return result;
} }
/* For the POP3 "protocol connect" and "doing" phases only */ /* For the POP3 "protocol connect" and "doing" phases only */

View File

@@ -1264,16 +1264,17 @@ static CURLcode smtp_block_statemach(struct connectdata *conn)
required */ required */
static CURLcode smtp_init(struct connectdata *conn) static CURLcode smtp_init(struct connectdata *conn)
{ {
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data;
struct SMTP *smtp = data->state.proto.smtp; struct SMTP *smtp = data->state.proto.smtp;
if(!smtp) { if(!smtp) {
smtp = data->state.proto.smtp = calloc(sizeof(struct SMTP), 1); smtp = data->state.proto.smtp = calloc(sizeof(struct SMTP), 1);
if(!smtp) if(!smtp)
return CURLE_OUT_OF_MEMORY; result = CURLE_OUT_OF_MEMORY;
} }
return CURLE_OK; return result;
} }
/* For the SMTP "protocol connect" and "doing" phases only */ /* For the SMTP "protocol connect" and "doing" phases only */