diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-03-09 22:25:40 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-03-09 22:25:40 +0000 |
commit | 059647f398b7b83e291909ce9d56dd9ecf9011de (patch) | |
tree | 68a1a5460b265f92bfc73cc5f188e7497a81f890 | |
parent | 136a3a0ee25f28fec1dde216467389f9e6e4f65c (diff) |
email: Removed hard returns from init functions
-rw-r--r-- | lib/imap.c | 5 | ||||
-rw-r--r-- | lib/pop3.c | 5 | ||||
-rw-r--r-- | lib/smtp.c | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/lib/imap.c b/lib/imap.c index 2d8fbbb8b..668ef9f7b 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -1752,16 +1752,17 @@ static CURLcode imap_block_statemach(struct connectdata *conn) required */ static CURLcode imap_init(struct connectdata *conn) { + CURLcode result = CURLE_OK; struct SessionHandle *data = conn->data; struct IMAP *imap = data->state.proto.imap; if(!imap) { imap = data->state.proto.imap = calloc(sizeof(struct IMAP), 1); 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 */ diff --git a/lib/pop3.c b/lib/pop3.c index 9eaa09b6c..80cf139b3 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -1272,16 +1272,17 @@ static CURLcode pop3_block_statemach(struct connectdata *conn) required */ static CURLcode pop3_init(struct connectdata *conn) { + CURLcode result = CURLE_OK; struct SessionHandle *data = conn->data; struct POP3 *pop3 = data->state.proto.pop3; if(!pop3) { pop3 = data->state.proto.pop3 = calloc(sizeof(struct POP3), 1); 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 */ diff --git a/lib/smtp.c b/lib/smtp.c index bed46a99a..594d09a14 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -1264,16 +1264,17 @@ static CURLcode smtp_block_statemach(struct connectdata *conn) required */ static CURLcode smtp_init(struct connectdata *conn) { + CURLcode result = CURLE_OK; struct SessionHandle *data = conn->data; struct SMTP *smtp = data->state.proto.smtp; if(!smtp) { smtp = data->state.proto.smtp = calloc(sizeof(struct SMTP), 1); 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 */ |