diff options
author | René Scharfe <l.s.r@web.de> | 2016-09-29 17:29:29 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-29 15:42:18 -0700 |
commit | 76dd98c13947bd811c1d11d0c63ccdc9a4fb3142 (patch) | |
tree | 71fe0bb6d2dafa7df4986c3cdd742d8f081324ad /sh-i18n--envsubst.c | |
parent | 9ed0d8d6e6de7737fe9a658446318b86e57c6fad (diff) | |
download | git-76dd98c13947bd811c1d11d0c63ccdc9a4fb3142.tar.gz |
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 'sh-i18n--envsubst.c')
-rw-r--r-- | sh-i18n--envsubst.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sh-i18n--envsubst.c b/sh-i18n--envsubst.c index 3637a2a64b..c3a2b5ad17 100644 --- a/sh-i18n--envsubst.c +++ b/sh-i18n--envsubst.c @@ -230,8 +230,7 @@ cmp_string (const void *pstr1, const void *pstr2) static inline void string_list_sort (string_list_ty *slp) { - if (slp->nitems > 0) - QSORT(slp->item, slp->nitems, cmp_string); + QSORT(slp->item, slp->nitems, cmp_string); } /* Test whether a sorted string list contains a given string. */ |