]> diplodocus.org Git - nmh/commitdiff
Replace `e ? 0 : 1' with `!e'.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 12 May 2017 22:14:43 +0000 (23:14 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 12 May 2017 22:14:43 +0000 (23:14 +0100)
Needs less thought to read.

sbr/datetime.c
uip/picksbr.c
uip/refile.c

index 693c49e..8b21e69 100644 (file)
@@ -451,7 +451,7 @@ format_datetime (tzdesc_t timezones, const contentline *node) {
                     return NULL;
                 }
 
-                dst = dt[1] > transition[0]  ?  0  :  1;
+                dst = dt[1] <= transition[0];
             }
         }
 
index 02be140..21777ed 100644 (file)
@@ -198,7 +198,7 @@ pcompile (char **vec, char *date)
     talked = 0;
 
     if ((head = parse ()) == NULL)
-       return (talked ? 0 : 1);
+        return !talked;
 
     if (*argp) {
        inform("%s unexpected", *argp);
index 05a533e..906eb89 100644 (file)
@@ -382,7 +382,7 @@ m_file (struct msgs *mp, char *msgfile, int oldmsgnum,
         * therefore won't be assigned to be the current message.
         */
        if ((msgnum = folder_addmsg (&fp->f_mp, msgfile,
-                                    mp == fp->f_mp ? 0 : 1,
+                                     mp != fp->f_mp,
                                     0, preserve, nfolders == 1 && refile,
                                     maildir)) == -1)
            return 1;
@@ -409,7 +409,7 @@ copy_seqs (struct msgs *oldmp, int oldmsgnum, struct msgs *newmp, int newmsgnum)
            assert ((int) seqnum == seq_getnum (oldmp, *seq));
            if (in_sequence (oldmp, seqnum, oldmsgnum)) {
                seq_addmsg (newmp, *seq, newmsgnum,
-                           is_seq_private (oldmp, seqnum) ? 0 : 1, 0);
+                            !is_seq_private (oldmp, seqnum), 0);
            }
        }
     }