From 6eceb5b64c0f77ca1cde968025e50a4f3f69f311 Mon Sep 17 00:00:00 2001 From: charles Date: Thu, 2 Feb 2006 22:14:44 +0000 Subject: [PATCH] Fix negative hash problem --- yaffs_guts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yaffs_guts.c b/yaffs_guts.c index 7d9fd41..0ab8d8a 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -13,7 +13,7 @@ */ const char *yaffs_guts_c_version = - "$Id: yaffs_guts.c,v 1.27 2005-12-20 04:02:18 charles Exp $"; + "$Id: yaffs_guts.c,v 1.28 2006-02-02 22:14:44 charles Exp $"; #include "yportenv.h" @@ -335,6 +335,7 @@ static Y_INLINE int yaffs_StillSomeChunkBits(yaffs_Device * dev, int blk) static Y_INLINE int yaffs_HashFunction(int n) { + n = abs(n); return (n % YAFFS_NOBJECT_BUCKETS); } -- 2.30.2