From f7b95a3fb1e45ff10c22d3148ae3c97d61a9c449 Mon Sep 17 00:00:00 2001 From: charles Date: Thu, 2 Feb 2006 22:22:57 +0000 Subject: [PATCH] Fix negative hashing --- yaffs_guts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yaffs_guts.c b/yaffs_guts.c index fcb217a..0a3f443 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -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); } -- 2.30.2