]> diplodocus.org Git - nmh/commitdiff
Don't `else' after return. Simplify control flow.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 20 Oct 2016 22:30:39 +0000 (23:30 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 20 Oct 2016 22:39:11 +0000 (23:39 +0100)
uip/sortm.c

index fbedaf26718c424df1881f2f9235c241a22c814f..9351ec036cdc9fa47652e42d4ef39de1500ceedd 100644 (file)
@@ -477,12 +477,11 @@ dsort (struct smsg **a, struct smsg **b)
 {
     if ((*a)->s_clock < (*b)->s_clock)
        return (-1);
 {
     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);
        return (1);
-    else if ((*a)->s_msg < (*b)->s_msg)
+    if ((*a)->s_msg < (*b)->s_msg)
        return (-1);
        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);
 
     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);
        return (-1);
-    else
-       return (1);
+    return (1);
 }
 
 static void
 }
 
 static void