fixup cast

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/stable@26673 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-06-16 16:01:20 +00:00
parent 2b65b50b9a
commit f0962c16cb

View file

@ -563,8 +563,8 @@ GSIMapNodeForKey(GSIMapTable map, GSIMapKey key)
#if (GSI_MAP_KTYPES & GSUNION_INT) #if (GSI_MAP_KTYPES & GSUNION_INT)
/* /*
* Specialized lookup for the case where keys are known to be simple integer * Specialized lookup for the case where keys are known to be simple integer
* or pointer values that are their own hash values and con be compared with * or pointer values that are their own hash values (when converted to unsigned
* a test for integer equality. * integers) and can be compared with a test for integer equality.
*/ */
static INLINE GSIMapNode static INLINE GSIMapNode
GSIMapNodeForSimpleKey(GSIMapTable map, GSIMapKey key) GSIMapNodeForSimpleKey(GSIMapTable map, GSIMapKey key)
@ -576,7 +576,7 @@ GSIMapNodeForSimpleKey(GSIMapTable map, GSIMapKey key)
{ {
return 0; return 0;
} }
bucket = map->buckets + key.addr % map->bucketCount; bucket = map->buckets + ((unsigned)key.addr) % map->bucketCount;
node = bucket->firstNode; node = bucket->firstNode;
while ((node != 0) && node->key.addr != key.addr) while ((node != 0) && node->key.addr != key.addr)
{ {