Fix negative hashing
[yaffs/.git] / yaffs_guts.c
index fcb217ae850f3b4d98fc85abccac0c7a43684b26..0a3f4435d1f6be85294e44d044d2c508bdc24f14 100644 (file)
@@ -14,7 +14,7 @@
  */
  //yaffs_guts.c
 
-const char *yaffs_guts_c_version="$Id: yaffs_guts.c,v 1.44 2005-11-07 07:03:02 charles Exp $";
+const char *yaffs_guts_c_version="$Id: yaffs_guts.c,v 1.45 2006-02-02 22:22:57 charles Exp $";
 
 #include "yportenv.h"
 
@@ -181,6 +181,7 @@ static  __inline__ yaffs_BlockInfo* yaffs_GetBlockInfo(yaffs_Device *dev, int bl
 
 static  __inline__ int yaffs_HashFunction(int n)
 {
+       n = abs(n);
        return (n % YAFFS_NOBJECT_BUCKETS);
 }