aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index d716169d4..7e408207c 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -796,11 +796,6 @@ static char *add_quote_for_spec_chars(char *found)
796 return s; 796 return s;
797} 797}
798 798
799static int match_compare(const void *a, const void *b)
800{
801 return strcmp(*(char**)a, *(char**)b);
802}
803
804/* Do TAB completion */ 799/* Do TAB completion */
805static void input_tab(smallint *lastWasTab) 800static void input_tab(smallint *lastWasTab)
806{ 801{
@@ -841,7 +836,7 @@ static void input_tab(smallint *lastWasTab)
841 /* Sort, then remove any duplicates found */ 836 /* Sort, then remove any duplicates found */
842 if (matches) { 837 if (matches) {
843 int i, n = 0; 838 int i, n = 0;
844 qsort(matches, num_matches, sizeof(char*), match_compare); 839 qsort_string_vector(matches, num_matches);
845 for (i = 0; i < num_matches - 1; ++i) { 840 for (i = 0; i < num_matches - 1; ++i) {
846 if (matches[i] && matches[i+1]) { /* paranoia */ 841 if (matches[i] && matches[i+1]) { /* paranoia */
847 if (strcmp(matches[i], matches[i+1]) == 0) { 842 if (strcmp(matches[i], matches[i+1]) == 0) {