summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/pkgcache.cc4
-rwxr-xr-xtest/integration/test-apt-cache2
2 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index e65e37bca..23b75a640 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -203,7 +203,7 @@ bool pkgCache::ReMap(bool const &Errorchecks)
table (480 used items) */
map_id_t pkgCache::sHash(const string &Str) const
{
- unsigned long Hash = 0;
+ uint32_t Hash = 0;
for (string::const_iterator I = Str.begin(); I != Str.end(); ++I)
Hash = 41 * Hash + tolower_ascii(*I);
return Hash % HeaderP->GetHashTableSize();
@@ -211,7 +211,7 @@ map_id_t pkgCache::sHash(const string &Str) const
map_id_t pkgCache::sHash(const char *Str) const
{
- unsigned long Hash = tolower_ascii(*Str);
+ uint32_t Hash = tolower_ascii(*Str);
for (const char *I = Str + 1; *I != 0; ++I)
Hash = 41 * Hash + tolower_ascii(*I);
return Hash % HeaderP->GetHashTableSize();
diff --git a/test/integration/test-apt-cache b/test/integration/test-apt-cache
index daa5974a1..f5bdf187a 100755
--- a/test/integration/test-apt-cache
+++ b/test/integration/test-apt-cache
@@ -48,8 +48,8 @@ testsuccess test -s dump.output
testsuccessequal 'dpkg
bar
-specific
fancy
+specific
foo' aptcache pkgnames
testsuccessequal 'bar' aptcache pkgnames bar
testsuccessequal 'fancy