From: Jiri Hruska Date: Sun, 24 Feb 2013 11:23:06 +0000 (+0100) Subject: imap: Simplified command response test in imap_endofresp() X-Git-Tag: curl-7_30_0~278 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c38d69f06a175ca6a92c3792d18630529a9357c2;p=curl imap: Simplified command response test in imap_endofresp() --- 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? */