From: Joel Rosdahl Date: Sat, 27 Feb 2010 22:27:48 +0000 (+0100) Subject: Portability: Let indexFor be a define instead of an inline function X-Git-Tag: v3.0pre0~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6ac19d570d374c9ab8bcebe00dd01c7809a01ca;p=thirdparty%2Fccache.git Portability: Let indexFor be a define instead of an inline function --- diff --git a/hashtable_private.h b/hashtable_private.h index a81afca88..a4909cde5 100644 --- a/hashtable_private.h +++ b/hashtable_private.h @@ -29,10 +29,7 @@ hash(struct hashtable *h, void *k); /*****************************************************************************/ /* indexFor */ -static inline unsigned int -indexFor(unsigned int tablelength, unsigned int hashvalue) { - return (hashvalue % tablelength); -} +#define indexFor(tablelength, hashvalue) ((hashvalue) % (tablelength)) /* Only works if tablelength == 2^N */ /*static inline unsigned int