OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
* objc/hash.h (hash_string): Don't use a cast as an lvalue.
[pf3gnuchains/gcc-fork.git]
/
libobjc
/
objc
/
hash.h
diff --git
a/libobjc/objc/hash.h
b/libobjc/objc/hash.h
index
acb6c99
..
02aca6e
100644
(file)
--- 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 *);
}