aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-03-08 23:02:20 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-03-08 23:02:20 +0000
commite5bb4e86ac35b84b87bf6e085859053db9136245 (patch)
treee7c6c0dd5d818b401ff737b832fbf70e840a89ad /lib
parent6d8d3069050cc1d1cfcf323f7571fe78f59ebb45 (diff)
email: Simplified nesting of if statements in *_doing() functions
Diffstat (limited to 'lib')
-rw-r--r--lib/imap.c8
-rw-r--r--lib/pop3.c8
-rw-r--r--lib/smtp.c8
3 files changed, 9 insertions, 15 deletions
diff --git a/lib/imap.c b/lib/imap.c
index ae5ec86c2..136d64379 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -2194,12 +2194,10 @@ static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done)
if(result)
DEBUGF(infof(conn->data, "DO phase failed\n"));
- else {
- if(*dophase_done) {
- result = imap_dophase_done(conn, FALSE /* not connected */);
+ else if(*dophase_done) {
+ result = imap_dophase_done(conn, FALSE /* not connected */);
- DEBUGF(infof(conn->data, "DO phase is complete\n"));
- }
+ DEBUGF(infof(conn->data, "DO phase is complete\n"));
}
return result;
diff --git a/lib/pop3.c b/lib/pop3.c
index 959266415..28a359ebe 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -1566,12 +1566,10 @@ static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done)
if(result)
DEBUGF(infof(conn->data, "DO phase failed\n"));
- else {
- if(*dophase_done) {
- result = pop3_dophase_done(conn, FALSE /* not connected */);
+ else if(*dophase_done) {
+ result = pop3_dophase_done(conn, FALSE /* not connected */);
- DEBUGF(infof(conn->data, "DO phase is complete\n"));
- }
+ DEBUGF(infof(conn->data, "DO phase is complete\n"));
}
return result;
diff --git a/lib/smtp.c b/lib/smtp.c
index 0f04397cc..21c202e3c 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -1565,12 +1565,10 @@ static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done)
if(result)
DEBUGF(infof(conn->data, "DO phase failed\n"));
- else {
- if(*dophase_done) {
- result = smtp_dophase_done(conn, FALSE /* not connected */);
+ else if(*dophase_done) {
+ result = smtp_dophase_done(conn, FALSE /* not connected */);
- DEBUGF(infof(conn->data, "DO phase is complete\n"));
- }
+ DEBUGF(infof(conn->data, "DO phase is complete\n"));
}
return result;