Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-09-29 18:27:31 +0300
committerJunio C Hamano <gitster@pobox.com>2016-09-30 01:42:18 +0300
commit9ed0d8d6e6de7737fe9a658446318b86e57c6fad (patch)
tree82fdefc7bd543c99091f5b634947360f75100deb /sh-i18n--envsubst.c
parentdbc540c7a5827529a3f58befc9e5b81a31ec8fab (diff)
use QSORT
Apply the semantic patch contrib/coccinelle/qsort.cocci to the code base, replacing calls of qsort(3) with QSORT. The resulting code is shorter and supports empty arrays with NULL pointers. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sh-i18n--envsubst.c')
-rw-r--r--sh-i18n--envsubst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh-i18n--envsubst.c b/sh-i18n--envsubst.c
index e06b2c1311..3637a2a64b 100644
--- a/sh-i18n--envsubst.c
+++ b/sh-i18n--envsubst.c
@@ -231,7 +231,7 @@ static inline void
string_list_sort (string_list_ty *slp)
{
if (slp->nitems > 0)
- qsort (slp->item, slp->nitems, sizeof (slp->item[0]), cmp_string);
+ QSORT(slp->item, slp->nitems, cmp_string);
}
/* Test whether a sorted string list contains a given string. */