From: Roland McGrath Date: Tue, 5 Oct 2004 18:09:38 +0000 (+0000) Subject: 2004-10-04 Roland McGrath X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=724b3ea926eec6d6e945a9d0faa2a1a5dbb33323;p=binutils-gdb.git 2004-10-04 Roland McGrath * hash.c (bfd_hash_set_default_size): Use const for table. Use size_t instead of int for variable compared to sizeof results. --- diff --git a/bfd/hash.c b/bfd/hash.c index 2954ec8d12e..2b06b922ce3 100644 --- a/bfd/hash.c +++ b/bfd/hash.c @@ -504,12 +504,12 @@ bfd_hash_traverse (table, func, info) void bfd_hash_set_default_size (bfd_size_type hash_size) { - int index; /* Extend this prime list if you want more granularity of hash table size. */ - static bfd_size_type hash_size_primes[] = + static const bfd_size_type hash_size_primes[] = { 1021, 4051, 8599, 16699 }; + size_t index; /* Work out best prime number near the hash_size. */ for (index = 0; index < ARRAY_SIZE (hash_size_primes) - 1; ++index)