From: Adam Heath Date: Sat, 13 Sep 2003 21:09:37 +0000 (+0000) Subject: Increase filesdb bin size, and alter hashing function. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1efdbb2808a3e07c4f8bf8e57fdbf98cf00d2983;p=dpkg Increase filesdb bin size, and alter hashing function. --- diff --git a/ChangeLog b/ChangeLog index 64e530ee..e63d7e03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Sep 13 16:09:13 CDT 2003 Adam Heath + + * main/filesdb.c: Increase filesdb bin size, and alter hashing function. + Sat Sep 13 16:04:37 CDT 2003 Adam Heath * scripts/dpkg-statoverride.pl: Fix "stripping trailing /" message from diff --git a/debian/changelog b/debian/changelog index dcf9dc22..82f299d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,9 @@ dpkg (1.10.11) unstable; urgency=low * Joey Hess : Fix "stripping trailing /" message from dpkg-statoverride. Closes: #203782 + * Sami Liedes : + Increase filesdb bin size, and alter hashing function. Closes: + #179385 -- Wichert Akkerman UNRELEASED diff --git a/main/filesdb.c b/main/filesdb.c index bac9cbc3..b5b086ea 100644 --- a/main/filesdb.c +++ b/main/filesdb.c @@ -520,7 +520,7 @@ struct fileiterator { int nbinn; }; -#define BINS (1 << 13) +#define BINS (1 << 17) /* This must always be a power of two. If you change it * consider changing the per-character hashing factor (currently * 1785 = 137*13) too. @@ -566,7 +566,7 @@ void filesdbinit(void) { static int hash(const char *name) { int v= 0; - while (*name) { v *= 1785; v += *name; name++; } + while (*name) { v *= 1787; v += *name; name++; } return v; }