From a82d639d7288cd088f539371b5e710311451c3cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ralf=20Cors=C3=A9pius?= Date: Mon, 29 Oct 2007 10:21:32 +0100 Subject: [PATCH] Use size_t for sizes. --- rpmdb/rpmhash.c | 4 ++-- rpmdb/rpmhash.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpmdb/rpmhash.c b/rpmdb/rpmhash.c index 49c8003..64812d3 100644 --- a/rpmdb/rpmhash.c +++ b/rpmdb/rpmhash.c @@ -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; diff --git a/rpmdb/rpmhash.h b/rpmdb/rpmhash.h index f5cce1d..5e840bd 100644 --- a/rpmdb/rpmhash.h +++ b/rpmdb/rpmhash.h @@ -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); /** -- 2.7.4