diff options
Diffstat (limited to 'gdb/bcache.c')
-rw-r--r-- | gdb/bcache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/bcache.c b/gdb/bcache.c index b7be967..ae43853 100644 --- a/gdb/bcache.c +++ b/gdb/bcache.c @@ -68,7 +68,7 @@ bcache::expand_hash_table () so we roughly double the table size each time. After we fall off the end of this table, we just double. Don't laugh --- there have been executables sighted with a gigabyte of debug info. */ - static unsigned long sizes[] = { + static const unsigned long sizes[] = { 1021, 2053, 4099, 8191, 16381, 32771, 65537, 131071, 262144, 524287, 1048573, 2097143, 4194301, 8388617, 16777213, 33554467, 67108859, 134217757, @@ -85,10 +85,10 @@ bcache::expand_hash_table () /* Find the next size. */ new_num_buckets = m_num_buckets * 2; - for (i = 0; i < (sizeof (sizes) / sizeof (sizes[0])); i++) - if (sizes[i] > m_num_buckets) + for (unsigned long a_size : sizes) + if (a_size > m_num_buckets) { - new_num_buckets = sizes[i]; + new_num_buckets = a_size; break; } |