From: Tom Tromey Date: Fri, 15 Apr 2011 15:05:04 +0000 (+0000) Subject: * dwarf2read.c (add_index_entry): Use VEC_last, not VEC_length. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cf31e6f9321a5449dd75d5263b917058c232dd80;p=binutils-gdb.git * dwarf2read.c (add_index_entry): Use VEC_last, not VEC_length. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f9ffd3270fb..46e69cab135 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2011-04-15 Tom Tromey + + * dwarf2read.c (add_index_entry): Use VEC_last, not VEC_length. + 2011-04-15 Gary Benson * MAINTAINERS: Add myself to write-after-approval section. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5bf98deb916..032fbd5f12d 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -15491,7 +15491,7 @@ add_index_entry (struct mapped_symtab *symtab, const char *name, /* Don't push an index twice. Due to how we add entries we only have to check the last one. */ if (VEC_empty (offset_type, (*slot)->cu_indices) - || VEC_length (offset_type, (*slot)->cu_indices) != cu_index) + || VEC_last (offset_type, (*slot)->cu_indices) != cu_index) VEC_safe_push (offset_type, (*slot)->cu_indices, cu_index); }