diff options
author | DJ Delorie <dj@redhat.com> | 2009-06-21 17:13:08 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2009-06-21 17:13:08 +0000 |
commit | 483d7cf40a669633cecaf6507b1de673befb6b84 (patch) | |
tree | b63fda7c9240f7afbbf17f158e2a8848d04055fa /libiberty/hashtab.c | |
parent | 102fd3cc91dcb092f1e4882fe085902a889f9700 (diff) | |
download | gdb-483d7cf40a669633cecaf6507b1de673befb6b84.zip gdb-483d7cf40a669633cecaf6507b1de673befb6b84.tar.gz gdb-483d7cf40a669633cecaf6507b1de673befb6b84.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/hashtab.c')
-rw-r--r-- | libiberty/hashtab.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index bf34a6d..3e64921 100644 --- a/libiberty/hashtab.c +++ b/libiberty/hashtab.c @@ -1,5 +1,5 @@ /* An expandable hash tables datatype. - Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 + Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009 Free Software Foundation, Inc. Contributed by Vladimir Makarov (vmakarov@cygnus.com). @@ -759,7 +759,8 @@ htab_traverse_noresize (htab_t htab, htab_trav callback, PTR info) void htab_traverse (htab_t htab, htab_trav callback, PTR info) { - if (htab_elements (htab) * 8 < htab_size (htab)) + size_t size = htab_size (htab); + if (htab_elements (htab) * 8 < size && size > 32) htab_expand (htab); htab_traverse_noresize (htab, callback, info); |