]> granicus.if.org Git - curl/commitdiff
imap: Standardised imapcode condition tests
authorSteve Holme <steve_holme@hotmail.com>
Sat, 2 Mar 2013 20:29:27 +0000 (20:29 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sat, 2 Mar 2013 20:29:27 +0000 (20:29 +0000)
For consistency changed two if(constant != imapcode) tests to be
if(imapcode != constant).

lib/imap.c

index 120686cec6a659c483d6839ab47179065579dc4b..c34a0578d1c363d21c3307bed1680c9ebdc98724 100644 (file)
@@ -1287,7 +1287,7 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode,
 
   (void)instate; /* no use for this yet */
 
-  if('*' != imapcode) {
+  if(imapcode != '*') {
     Curl_pgrsSetDownloadSize(data, 0);
     state(conn, IMAP_STOP);
     return CURLE_REMOTE_FILE_NOT_FOUND; /* TODO: Fix error code */
@@ -1375,7 +1375,7 @@ static CURLcode imap_state_fetch_final_resp(struct connectdata *conn,
 
   (void)instate; /* No use for this yet */
 
-  if('O' != imapcode)
+  if(imapcode != 'O')
     result = CURLE_FTP_WEIRD_SERVER_REPLY; /* TODO: Fix error code */
   else
     result = CURLE_OK;