diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2001-04-01 19:50:50 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@dberlin.org> | 2001-04-01 19:50:50 +0000 |
commit | 4e4f46a17d11ba5023cc11d18a8fb01ecc1e7fae (patch) | |
tree | 744a06be964c6c7d561ee35e10eb389367ebdfc0 /gdb/symtab.c | |
parent | ba8629a96e44b40a6c34fd0d2922ac237717e93d (diff) | |
download | gdb-4e4f46a17d11ba5023cc11d18a8fb01ecc1e7fae.zip gdb-4e4f46a17d11ba5023cc11d18a8fb01ecc1e7fae.tar.gz gdb-4e4f46a17d11ba5023cc11d18a8fb01ecc1e7fae.tar.bz2 |
2001-03-20 Daniel Berlin <dberlin@redhat.com>
* symtab.c (completion_list_add_name): Remove duplicate string checks,
readline already does this, and it's much faster at it, too.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index a51126a..6cb8e96 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2844,17 +2844,6 @@ completion_list_add_name (char *symname, char *sym_text, int sym_text_len, return; } - /* Clip any symbol names that we've already considered. (This is a - time optimization) */ - - for (i = 0; i < return_val_index; ++i) - { - if (STREQ (symname, return_val[i])) - { - return; - } - } - /* We have a match for a completion, so add SYMNAME to the current list of matches. Note that the name is moved to freshly malloc'd space. */ @@ -2880,19 +2869,6 @@ completion_list_add_name (char *symname, char *sym_text, int sym_text_len, strcat (new, symname); } - /* Recheck for duplicates if we intend to add a modified symbol. */ - if (word != sym_text) - { - for (i = 0; i < return_val_index; ++i) - { - if (STREQ (new, return_val[i])) - { - xfree (new); - return; - } - } - } - if (return_val_index + 3 > return_val_size) { newsize = (return_val_size *= 2) * sizeof (char *); |