diff options
-rw-r--r-- | doc/HISTORY | 3 | ||||
-rw-r--r-- | lib/libpammap.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/doc/HISTORY b/doc/HISTORY index 57fca970..b9d39af0 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -6,6 +6,9 @@ CHANGE HISTORY not yet BJH Release 10.60.00 + pnm_hashtuple: slight performance improvement from new hash + function. Thanks Prophet of the Way <afu@wta.att.ne.jp>. + ppmtospu: wild memory accesses. Always broken (program added in 10.58 (March 2012). diff --git a/lib/libpammap.c b/lib/libpammap.c index 8477875a..fe6cba2d 100644 --- a/lib/libpammap.c +++ b/lib/libpammap.c @@ -31,9 +31,10 @@ pnm_hashtuple(struct pam * const pamP, Return the hash value of the tuple 'tuple' -- i.e. an index into a hash table. -----------------------------------------------------------------------------*/ + unsigned int const hash_factor[] = {1, 33, 33*33}; + unsigned int i; unsigned int hash; - const unsigned int hash_factor[] = {33*33, 33, 1}; hash = 0; /* initial value */ for (i = 0; i < MIN(pamP->depth, 3); ++i) { |