summaryrefslogtreecommitdiff
path: root/libobjc/objc
diff options
context:
space:
mode:
authorJoseph Myers <jsm@polyomino.org.uk>2003-10-20 22:50:13 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2003-10-20 22:50:13 +0100
commitbeca20d2a099ff9b732c1895dcb8b7b42ea9897f (patch)
tree259767c12d7657e0e50b6cf4b20f8781262ef182 /libobjc/objc
parentd4d1ebc191e5c1d00266d9c0207c5dde69f5e216 (diff)
downloadgcc-beca20d2a099ff9b732c1895dcb8b7b42ea9897f.tar.gz
* objc/hash.h (hash_string): Don't use a cast as an lvalue.
From-SVN: r72722
Diffstat (limited to 'libobjc/objc')
-rw-r--r--libobjc/objc/hash.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libobjc/objc/hash.h b/libobjc/objc/hash.h
index acb6c9979d4..02aca6e8765 100644
--- a/libobjc/objc/hash.h
+++ b/libobjc/objc/hash.h
@@ -172,10 +172,10 @@ hash_string (cache_ptr cache, const void *key)
{
unsigned int ret = 0;
unsigned int ctr = 0;
+ const char *ckey = key;
-
- while (*(const char *) key) {
- ret ^= *((const char *) key)++ << ctr;
+ while (*ckey) {
+ ret ^= *ckey++ << ctr;
ctr = (ctr + 1) % sizeof (void *);
}