From: Ralph Corderoy Date: Fri, 15 Sep 2017 21:58:59 +0000 (+0100) Subject: Invert ternary condition to remove one negative. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/4d0110006d4e72f82fb597f170c7d9991f2ca0bf?hp=01fd4094faf9fa892faad3621433e5faa98157f9 Invert ternary condition to remove one negative. Replaces `i != NOTOK ? OK : NOTOK' with `i == NOTOK ? NOTOK : OK'. --- diff --git a/uip/dropsbr.c b/uip/dropsbr.c index 77322d4d..cc44c8d4 100644 --- a/uip/dropsbr.c +++ b/uip/dropsbr.c @@ -187,7 +187,7 @@ mbx_copy (char *mailbox, int mbx_style, int md, int fd, 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) diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index 09c51015..64bddb69 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -782,7 +782,7 @@ losing: 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) {