Use size_t for sizes.
authorRalf Corsépius <corsepiu@fedoraproject.org>
Mon, 29 Oct 2007 09:21:32 +0000 (10:21 +0100)
committerRalf Corsépius <corsepiu@fedoraproject.org>
Mon, 29 Oct 2007 09:21:32 +0000 (10:21 +0100)
rpmdb/rpmhash.c
rpmdb/rpmhash.h

index 49c8003..64812d3 100644 (file)
@@ -25,7 +25,7 @@ voidptr * data;               /*!< pointer to hashed data */
  */
 struct hashTable_s {
     int numBuckets;                    /*!< number of hash buckets */
-    int keySize;                       /*!< size of key (0 if unknown) */
+    size_t keySize;                    /*!< size of key (0 if unknown) */
     int freeData;      /*!< should data be freed when table is destroyed? */
     hashBucket * buckets;              /*!< hash bucket array */
     hashFunctionType fn;               /*!< generate hash value for key */
@@ -77,7 +77,7 @@ unsigned int hashFunctionString(const void * string)
     return ((((unsigned)len) << 16) + (((unsigned)sum) << 8) + xorValue);
 }
 
-hashTable htCreate(int numBuckets, int keySize, int freeData,
+hashTable htCreate(int numBuckets, size_t keySize, int freeData,
                hashFunctionType fn, hashEqualityType eq)
 {
     hashTable ht;
index f5cce1d..5e840bd 100644 (file)
@@ -48,7 +48,7 @@ int hashEqualityString(const void * key1, const void * key2);
  * @param eq            function to compare hash keys for equality
  * @return             pointer to initialized hash table
  */
-hashTable htCreate(int numBuckets, int keySize, int freeData,
+hashTable htCreate(int numBuckets, size_t keySize, int freeData,
                hashFunctionType fn, hashEqualityType eq); 
 
 /**