]> diplodocus.org Git - nmh/commitdiff
Invert ternary condition to remove one negative.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 15 Sep 2017 21:58:59 +0000 (22:58 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 15 Sep 2017 21:58:59 +0000 (22:58 +0100)
Replaces `i != NOTOK ? OK : NOTOK' with `i == NOTOK ? NOTOK : OK'.

uip/dropsbr.c
uip/mhstoresbr.c

index 77322d4d60b251b513d6b83cf395dad7b784414a..cc44c8d472399c42cd130cd2b8f426dca15911f0 100644 (file)
@@ -187,7 +187,7 @@ mbx_copy (char *mailbox, int mbx_style, int md, int fd,
            if (write (md, MMDF_DELIM, j) != j)
                return NOTOK;
 
            if (write (md, MMDF_DELIM, j) != j)
                return NOTOK;
 
-           return i != NOTOK ? OK : NOTOK;
+            return i == NOTOK ? NOTOK : OK;
 
        case MBOX_FORMAT:
            if ((j = dup (fd)) == NOTOK)
 
        case MBOX_FORMAT:
            if ((j = dup (fd)) == NOTOK)
index 09c5101595846a93832d3203c700ac5216f6975d..64bddb6988f95c06386deb3456ac78e1ed4cc469 100644 (file)
@@ -782,7 +782,7 @@ losing:
 
        fclose (fp);
 
 
        fclose (fp);
 
-       return cc != NOTOK ? OK : NOTOK;
+        return cc == NOTOK ? NOTOK : OK;
     }
 
     if (!ct->c_fp && (ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
     }
 
     if (!ct->c_fp && (ct->c_fp = fopen (ct->c_file, "r")) == NULL) {