From: Ralph Corderoy Date: Thu, 20 Oct 2016 22:30:39 +0000 (+0100) Subject: Don't `else' after return. Simplify control flow. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/4aace27b5eeab890bdab8e1e1725b02ab435ff6a?hp=320d20e5887b9f8bb40f57088d6b316f8ce9da6c Don't `else' after return. Simplify control flow. --- diff --git a/uip/sortm.c b/uip/sortm.c index fbedaf26..9351ec03 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -477,12 +477,11 @@ dsort (struct smsg **a, struct smsg **b) { if ((*a)->s_clock < (*b)->s_clock) return (-1); - else if ((*a)->s_clock > (*b)->s_clock) + if ((*a)->s_clock > (*b)->s_clock) return (1); - else if ((*a)->s_msg < (*b)->s_msg) + if ((*a)->s_msg < (*b)->s_msg) return (-1); - else - return (1); + return (1); } /* @@ -506,10 +505,9 @@ txtsort (struct smsg **a, struct smsg **b) if ((i = strcmp ((*a)->s_subj, (*b)->s_subj))) return (i); - else if ((*a)->s_msg < (*b)->s_msg) + if ((*a)->s_msg < (*b)->s_msg) return (-1); - else - return (1); + return (1); } static void