diff options
author | Jiri Hruska <jirka@fud.cz> | 2013-02-24 12:23:06 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-02-24 12:02:57 +0000 |
commit | c38d69f06a175ca6a92c3792d18630529a9357c2 (patch) | |
tree | a29d15b35e5f8952215dd8c6c106fce06c4fc195 | |
parent | 324b7fe47b863eaa99475dd86b9f73059fb26ab1 (diff) |
imap: Simplified command response test in imap_endofresp()
-rw-r--r-- | lib/imap.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/imap.c b/lib/imap.c index 6bd8c429c..3a9ee45a9 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -335,12 +335,10 @@ static bool imap_endofresp(struct connectdata *conn, char *line, size_t len, size_t wordlen; /* Do we have a tagged command response? */ - if(len >= id_len + 3) { - if(!memcmp(id, line, id_len) && line[id_len] == ' ') { - *resp = line[id_len + 1]; /* O, N or B */ + if(len >= id_len + 3 && !memcmp(id, line, id_len) && line[id_len] == ' ') { + *resp = line[id_len + 1]; /* O, N or B */ - return TRUE; - } + return TRUE; } /* Do we have a continuation response? */ |