summaryrefslogtreecommitdiff
path: root/lib/rpmhash.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-05-21 15:36:03 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-05-21 15:36:03 +0300
commit0e04c09d4896fe6ba1431c5383bde24983ed1f1f (patch)
treed1a76ae4b2a788b8662322ab08c4c751bbe5f514 /lib/rpmhash.c
parent8cb7b9085c58aff778ecda18d2073af2fa7082df (diff)
downloadrpm-0e04c09d4896fe6ba1431c5383bde24983ed1f1f.tar.gz
rpm-0e04c09d4896fe6ba1431c5383bde24983ed1f1f.tar.bz2
rpm-0e04c09d4896fe6ba1431c5383bde24983ed1f1f.zip
Move the lone hashFunctionString() into misc.[ch], eliminate rpmhash.[ch]
- Besides there not being much point in having a separate source + header for a small single function, this fixes build on case-insensitive systems such as Mac OS X.
Diffstat (limited to 'lib/rpmhash.c')
-rw-r--r--lib/rpmhash.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/rpmhash.c b/lib/rpmhash.c
deleted file mode 100644
index 34be31354..000000000
--- a/lib/rpmhash.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * \file lib/rpmhash.c
- * Hash table implemenation
- */
-
-#include "lib/rpmhash.h"
-
-
-unsigned int hashFunctionString(const char * string) {
- /* Jenkins One-at-a-time hash */
-
- unsigned int hash = 0xe4721b68;
-
- while (*string != '\0') {
- hash += *string;
- hash += (hash << 10);
- hash ^= (hash >> 6);
- string++;
- }
- hash += (hash << 3);
- hash ^= (hash >> 11);
- hash += (hash << 15);
- return hash;
-}