diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Kbuild | 1 | ||||
-rw-r--r-- | libbb/lineedit.c | 7 |
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 | |||
12 | lib-y += bb_basename.o | 12 | lib-y += bb_basename.o |
13 | lib-y += bb_do_delay.o | 13 | lib-y += bb_do_delay.o |
14 | lib-y += bb_pwd.o | 14 | lib-y += bb_pwd.o |
15 | lib-y += bb_qsort.o | ||
15 | lib-y += bb_strtonum.o | 16 | lib-y += bb_strtonum.o |
16 | lib-y += change_identity.o | 17 | lib-y += change_identity.o |
17 | lib-y += chomp.o | 18 | lib-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 | ||
799 | static 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 */ |
805 | static void input_tab(smallint *lastWasTab) | 800 | static 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) { |