From: jjenista Date: Thu, 14 Oct 2010 17:47:51 +0000 (+0000) Subject: hash of OIDs should not bit shift X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=400020e7605a0da05b43056401f0d184a99c5781;p=IRC.git hash of OIDs should not bit shift --- diff --git a/Robust/src/Runtime/mlp_runtime.c b/Robust/src/Runtime/mlp_runtime.c index 0fd4f39b..ed2a11f7 100644 --- a/Robust/src/Runtime/mlp_runtime.c +++ b/Robust/src/Runtime/mlp_runtime.c @@ -144,7 +144,7 @@ int isWriteBinItem(BinItem* b){ } int generateKey(unsigned int data){ - return (data&H_MASK)>> 4; + return (data&H_MASK); } Hashtable* createHashtable(){ diff --git a/Robust/src/Runtime/mlp_runtime.h b/Robust/src/Runtime/mlp_runtime.h index 743fe189..e6482ba0 100644 --- a/Robust/src/Runtime/mlp_runtime.h +++ b/Robust/src/Runtime/mlp_runtime.h @@ -16,7 +16,7 @@ #define TRUE 1 #endif -#define NUMBINS 64 +#define NUMBINS 128 #define NUMREAD 64 #define NUMITEMS 64 #define NUMRENTRY 256 @@ -39,7 +39,7 @@ #define READBIN 0 #define WRITEBIN 1 -#define H_MASK (NUMBINS<<4)-1 +#define H_MASK (NUMBINS)-1 #ifndef FALSE #define FALSE 0