]> granicus.if.org Git - curl/commitdiff
imap: Small tidy up of imap_select() to match imap_append()
authorSteve Holme <steve_holme@hotmail.com>
Tue, 5 Mar 2013 19:59:53 +0000 (19:59 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Tue, 5 Mar 2013 19:59:53 +0000 (19:59 +0000)
Updated the style of imap_select() before adding the LIST command.

lib/imap.c

index 29784e9e829afae5d2456290215e3dd76673f9e3..9d39cc6d0e00597f3fbd0e2add2514b9bd8ec7a7 100644 (file)
@@ -701,10 +701,10 @@ static CURLcode imap_select(struct connectdata *conn)
   /* Make sure the mailbox is in the correct atom format */
   mailbox = imap_atom(imap->mailbox);
   if(!mailbox)
-    result = CURLE_OUT_OF_MEMORY;
-  else
-    /* Send the SELECT command */
-    result = imap_sendf(conn, "SELECT %s", mailbox);
+    return CURLE_OUT_OF_MEMORY;
+
+  /* Send the SELECT command */
+  result = imap_sendf(conn, "SELECT %s", mailbox);
 
   Curl_safefree(mailbox);