summaryrefslogtreecommitdiff
path: root/libobjc/objc
diff options
context:
space:
mode:
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 *);
}