aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Kbuild1
-rw-r--r--libbb/lineedit.c7
2 files changed, 2 insertions, 6 deletions
diff --git a/libbb/Kbuild b/libbb/Kbuild
index fd366559a..654722cd6 100644
--- a/libbb/Kbuild
+++ b/libbb/Kbuild
@@ -12,6 +12,7 @@ lib-y += bb_askpass.o
12lib-y += bb_basename.o 12lib-y += bb_basename.o
13lib-y += bb_do_delay.o 13lib-y += bb_do_delay.o
14lib-y += bb_pwd.o 14lib-y += bb_pwd.o
15lib-y += bb_qsort.o
15lib-y += bb_strtonum.o 16lib-y += bb_strtonum.o
16lib-y += change_identity.o 17lib-y += change_identity.o
17lib-y += chomp.o 18lib-y += chomp.o
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) {