summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-03-02 20:40:38 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-03-02 20:40:38 +0000
commite94fbcabd77d51dd3a01e0d3dec3646abaa5742e (patch)
treee871ea402b76786e0026f16577aae8f985fd9e84
parentec38ac38c7b10181b70cc1ed582136d8b61ac83d (diff)
downloadcurl-e94fbcabd77d51dd3a01e0d3dec3646abaa5742e.tar.gz
imap: Simplified the imap_state_append_resp() function
Introduced the result code variable to simplify the state changes and remove the hard returns.
-rw-r--r--lib/imap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/imap.c b/lib/imap.c
index 263296142..c61231b2a 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1391,23 +1391,23 @@ static CURLcode imap_state_append_resp(struct connectdata *conn,
int imapcode,
imapstate instate)
{
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
(void)instate; /* No use for this yet */
if(imapcode != '+') {
- state(conn, IMAP_STOP);
- return CURLE_UPLOAD_FAILED;
+ result = CURLE_UPLOAD_FAILED;
}
else {
Curl_pgrsSetUploadSize(data, data->set.infilesize);
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* No download */
FIRSTSOCKET, NULL);
-
- /* Stop now and let the core go from DO to PERFORM phase */
- state(conn, IMAP_STOP);
- return CURLE_OK;
}
+
+ state(conn, IMAP_STOP);
+
+ return result;
}
/* For final APPEND responses performed after the upload */