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 fd36655..654722c 100644 --- a/libbb/Kbuild +++ b/libbb/Kbuild @@ -12,6 +12,7 @@ lib-y += bb_askpass.o lib-y += bb_basename.o lib-y += bb_do_delay.o lib-y += bb_pwd.o +lib-y += bb_qsort.o lib-y += bb_strtonum.o lib-y += change_identity.o lib-y += chomp.o diff --git a/libbb/lineedit.c b/libbb/lineedit.c index d716169..7e40820 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -796,11 +796,6 @@ static char *add_quote_for_spec_chars(char *found) return s; } -static int match_compare(const void *a, const void *b) -{ - return strcmp(*(char**)a, *(char**)b); -} - /* Do TAB completion */ static void input_tab(smallint *lastWasTab) { @@ -841,7 +836,7 @@ static void input_tab(smallint *lastWasTab) /* Sort, then remove any duplicates found */ if (matches) { int i, n = 0; - qsort(matches, num_matches, sizeof(char*), match_compare); + qsort_string_vector(matches, num_matches); for (i = 0; i < num_matches - 1; ++i) { if (matches[i] && matches[i+1]) { /* paranoia */ if (strcmp(matches[i], matches[i+1]) == 0) { |