]> granicus.if.org Git - curl/commitdiff
imap: Simplified command response test in imap_endofresp()
authorJiri Hruska <jirka@fud.cz>
Sun, 24 Feb 2013 11:23:06 +0000 (12:23 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 24 Feb 2013 12:02:57 +0000 (12:02 +0000)
lib/imap.c

index 6bd8c429cbdc6e4618ab703c3a1916508a129ea7..3a9ee45a94d5d2b87e36fd23b46fb13415f82d19 100644 (file)
@@ -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? */