diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2001-10-07 14:45:04 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2001-10-07 14:45:04 +0000 |
commit | 0be6abca220b75aa5a3394fc1f89705aa37c0ebf (patch) | |
tree | a0690de0f4f882e39e15d7ffb604d61ec38915f9 /libiberty/hashtab.c | |
parent | 59d42021f94fd5aa07147cb63d9187c93f4f13b9 (diff) | |
download | gcc-0be6abca220b75aa5a3394fc1f89705aa37c0ebf.zip gcc-0be6abca220b75aa5a3394fc1f89705aa37c0ebf.tar.gz gcc-0be6abca220b75aa5a3394fc1f89705aa37c0ebf.tar.bz2 |
demangle.h (demangler_engine): Const-ify.
include:
* demangle.h (demangler_engine): Const-ify.
* libiberty.h (buildargv): Likewise.
libiberty:
* argv.c (buildargv, tests, main): Const-ify.
* cp-demangle.c (operator_code): Likewise.
* cplus-dem.c (optable, libiberty_demanglers,
cplus_demangle_set_style, cplus_demangle_name_to_style,
print_demangler_list): Likewise.
* hashtab.c (higher_prime_number): Likewise.
* strcasecmp.c (charmap): Likewise.
* strerror.c (error_info, strerror, main): Likewise.
* strncasecmp.c (charmap): Likewise.
* strsignal.c (signal_info): Likewise.
From-SVN: r46060
Diffstat (limited to 'libiberty/hashtab.c')
-rw-r--r-- | libiberty/hashtab.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index 89bfe08..36ad6e4 100644 --- a/libiberty/hashtab.c +++ b/libiberty/hashtab.c @@ -80,7 +80,7 @@ higher_prime_number (n) { /* These are primes that are near, but slightly smaller than, a power of two. */ - static unsigned long primes[] = { + static const unsigned long primes[] = { (unsigned long) 2, (unsigned long) 7, (unsigned long) 13, @@ -115,12 +115,12 @@ higher_prime_number (n) ((unsigned long) 2147483647) + ((unsigned long) 2147483644), }; - unsigned long* low = &primes[0]; - unsigned long* high = &primes[sizeof(primes) / sizeof(primes[0])]; + const unsigned long *low = &primes[0]; + const unsigned long *high = &primes[sizeof(primes) / sizeof(primes[0])]; while (low != high) { - unsigned long* mid = low + (high - low) / 2; + const unsigned long *mid = low + (high - low) / 2; if (n > *mid) low = mid + 1; else |