diff options
author | Jim Blandy <jimb@codesourcery.com> | 2002-02-23 03:57:26 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2002-02-23 03:57:26 +0000 |
commit | d85a5daf253cfae20df8dde7fe6699cc830b7cf5 (patch) | |
tree | b6835f22a75d0512208d11d46a0189f44c4f87db /gdb/bcache.c | |
parent | *** empty log message *** (diff) | |
download | binutils-gdb-d85a5daf253cfae20df8dde7fe6699cc830b7cf5.tar.gz binutils-gdb-d85a5daf253cfae20df8dde7fe6699cc830b7cf5.tar.bz2 binutils-gdb-d85a5daf253cfae20df8dde7fe6699cc830b7cf5.zip |
Indicate that the bcache functions don't change the strings
they're passed.
* bcache.h (bcache, hash): Add `const' keywords to declarations.
* bcache.c (bcache, hash): Add `const' keywords to definitions.
Diffstat (limited to 'gdb/bcache.c')
-rw-r--r-- | gdb/bcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/bcache.c b/gdb/bcache.c index 0f9c2a25ccc..753a916d2e8 100644 --- a/gdb/bcache.c +++ b/gdb/bcache.c @@ -33,7 +33,7 @@ */ unsigned long -hash(void *addr, int length) +hash(const void *addr, int length) { const unsigned char *k, *e; unsigned long h; @@ -127,7 +127,7 @@ expand_hash_table (struct bcache *bcache) never seen those bytes before, add a copy of them to BCACHE. In either case, return a pointer to BCACHE's copy of that string. */ void * -bcache (void *addr, int length, struct bcache *bcache) +bcache (const void *addr, int length, struct bcache *bcache) { int hash_index; struct bstring *s; |