diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-20 21:50:13 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-20 21:50:13 +0000 |
commit | 6f57920769f487e617e44025d103f35fdb923870 (patch) | |
tree | 259767c12d7657e0e50b6cf4b20f8781262ef182 /libobjc/objc | |
parent | 19489abdae422545cf21f5234f199cd9a7e664e5 (diff) | |
download | gcc-6f57920769f487e617e44025d103f35fdb923870.tar.gz |
* objc/hash.h (hash_string): Don't use a cast as an lvalue.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72722 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/objc')
-rw-r--r-- | libobjc/objc/hash.h | 6 |
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 *); } |