From 44bdcc07c0b350262b4876d5a392772443133c81 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Thu, 19 Jul 2018 11:43:37 +0100 Subject: [PATCH] Remove parentheses from return statements --- commands.c | 2 +- mutt_thread.c | 4 ++-- ncrypt/crypt_gpgme.c | 8 ++++---- nntp/nntp.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/commands.c b/commands.c index 7e97d7223..259e7c8da 100644 --- a/commands.c +++ b/commands.c @@ -648,7 +648,7 @@ int mutt_select_sort(int reverse) new_sort |= SORT_REVERSE; Sort = new_sort; - return (Sort != method ? 0 : -1); /* no need to resort if it's the same */ + return (Sort != method) ? 0 : -1; /* no need to resort if it's the same */ } /** diff --git a/mutt_thread.c b/mutt_thread.c index 22b096967..0233ecd03 100644 --- a/mutt_thread.c +++ b/mutt_thread.c @@ -574,8 +574,8 @@ static int compare_threads(const void *a, const void *b) if (a && b) { - return ((*sort_func)(&(*((struct MuttThread **) a))->sort_key, - &(*((struct MuttThread **) b))->sort_key)); + return (*sort_func)(&(*((struct MuttThread **) a))->sort_key, + &(*((struct MuttThread **) b))->sort_key); } /* a hack to let us reset sort_func even though we can't * have extra arguments because of qsort diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 3cf276c32..52cf1457f 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -3163,8 +3163,8 @@ static int compare_key_address(const void *a, const void *b) static int crypt_compare_address(const void *a, const void *b) { - return ((PgpSortKeys & SORT_REVERSE) ? !compare_key_address(a, b) : - compare_key_address(a, b)); + return (PgpSortKeys & SORT_REVERSE) ? !compare_key_address(a, b) : + compare_key_address(a, b); } /** @@ -3277,8 +3277,8 @@ static int compare_key_trust(const void *a, const void *b) static int crypt_compare_trust(const void *a, const void *b) { - return ((PgpSortKeys & SORT_REVERSE) ? !compare_key_trust(a, b) : - compare_key_trust(a, b)); + return (PgpSortKeys & SORT_REVERSE) ? !compare_key_trust(a, b) : + compare_key_trust(a, b); } /** diff --git a/nntp/nntp.c b/nntp/nntp.c index a9425c081..0251d060e 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -2622,7 +2622,7 @@ int nntp_compare_order(const void *a, const void *b) anum_t nb = NHDR(*hb)->article_num; int result = (na == nb) ? 0 : (na > nb) ? 1 : -1; result = perform_auxsort(result, a, b); - return (SORTCODE(result)); + return SORTCODE(result); } // clang-format off -- 2.40.0