]> granicus.if.org Git - mutt/commitdiff
Fix AUXSORT usage in compare_spam.
authorKevin McCarthy <kevin@8t8.us>
Sat, 28 Jul 2018 19:59:35 +0000 (12:59 -0700)
committerKevin McCarthy <kevin@8t8.us>
Sat, 28 Jul 2018 19:59:35 +0000 (12:59 -0700)
AUXSORT already checks if the first parameter is zero.

Additionally, the macro expands into more than one statement, so
putting inside an unbracketed if is misleading and generates a
warning on the latest gcc.

Fortunately, both statements checked if the first parameter was zero,
so no actual bug resulted.

sort.c

diff --git a/sort.c b/sort.c
index f2e1d5ef9a8a4115760f2a3dd7c802ba20355d51..40cb4b88e0741ba32a11c9fb61986714221a2679 100644 (file)
--- a/sort.c
+++ b/sort.c
@@ -203,8 +203,7 @@ static int compare_spam (const void *a, const void *b)
   if (result == 0)
   {
     result = strcmp(aptr, bptr);
-    if (result == 0)
-      AUXSORT(result, a, b);
+    AUXSORT(result, a, b);
   }
 
   return (SORTCODE(result));