summaryrefslogtreecommitdiff
path: root/builtin/fmt-merge-msg.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-09-29 15:29:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-09-29 22:42:18 (GMT)
commit76dd98c13947bd811c1d11d0c63ccdc9a4fb3142 (patch)
tree71fe0bb6d2dafa7df4986c3cdd742d8f081324ad /builtin/fmt-merge-msg.c
parent9ed0d8d6e6de7737fe9a658446318b86e57c6fad (diff)
downloadgit-76dd98c13947bd811c1d11d0c63ccdc9a4fb3142.zip
git-76dd98c13947bd811c1d11d0c63ccdc9a4fb3142.tar.gz
git-76dd98c13947bd811c1d11d0c63ccdc9a4fb3142.tar.bz2
remove unnecessary check before QSORT
Add a semantic patch for removing checks similar to the one that QSORT already does internally and apply it to the code base. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fmt-merge-msg.c')
-rw-r--r--builtin/fmt-merge-msg.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 4976967..efab62f 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -314,12 +314,10 @@ static void add_people_info(struct strbuf *out,
struct string_list *authors,
struct string_list *committers)
{
- if (authors->nr)
- QSORT(authors->items, authors->nr,
- cmp_string_list_util_as_integral);
- if (committers->nr)
- QSORT(committers->items, committers->nr,
- cmp_string_list_util_as_integral);
+ QSORT(authors->items, authors->nr,
+ cmp_string_list_util_as_integral);
+ QSORT(committers->items, committers->nr,
+ cmp_string_list_util_as_integral);
credit_people(out, authors, 'a');
credit_people(out, committers, 'c');