From f0962c16cbcbb5a97172e406188a3bcf3318a214 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Mon, 16 Jun 2008 16:01:20 +0000 Subject: [PATCH] fixup cast git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/stable@26673 72102866-910b-0410-8b05-ffd578937521 --- Headers/Additions/GNUstepBase/GSIMap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Headers/Additions/GNUstepBase/GSIMap.h b/Headers/Additions/GNUstepBase/GSIMap.h index 1a59f5081..c8ca2ec9c 100644 --- a/Headers/Additions/GNUstepBase/GSIMap.h +++ b/Headers/Additions/GNUstepBase/GSIMap.h @@ -563,8 +563,8 @@ GSIMapNodeForKey(GSIMapTable map, GSIMapKey key) #if (GSI_MAP_KTYPES & GSUNION_INT) /* * 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 - * a test for integer equality. + * or pointer values that are their own hash values (when converted to unsigned + * integers) and can be compared with a test for integer equality. */ static INLINE GSIMapNode GSIMapNodeForSimpleKey(GSIMapTable map, GSIMapKey key) @@ -576,7 +576,7 @@ GSIMapNodeForSimpleKey(GSIMapTable map, GSIMapKey key) { return 0; } - bucket = map->buckets + key.addr % map->bucketCount; + bucket = map->buckets + ((unsigned)key.addr) % map->bucketCount; node = bucket->firstNode; while ((node != 0) && node->key.addr != key.addr) {