]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Portability: Let indexFor be a define instead of an inline function
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 27 Feb 2010 22:27:48 +0000 (23:27 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 27 Feb 2010 22:27:48 +0000 (23:27 +0100)
hashtable_private.h

index a81afca8843485fedaf72c40b39f9133bae9ea30..a4909cde531c4dbc621813cd9e5e273397634635 100644 (file)
@@ -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