From c38d69f06a175ca6a92c3792d18630529a9357c2 Mon Sep 17 00:00:00 2001 From: Jiri Hruska Date: Sun, 24 Feb 2013 12:23:06 +0100 Subject: imap: Simplified command response test in imap_endofresp() --- lib/imap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/imap.c') 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? */ -- cgit v1.2.3