aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/hash/hashfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/hash/hashfunc.c')
-rw-r--r--src/backend/access/hash/hashfunc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/access/hash/hashfunc.c b/src/backend/access/hash/hashfunc.c
index 4cb157c702c..9cb2a02cf3a 100644
--- a/src/backend/access/hash/hashfunc.c
+++ b/src/backend/access/hash/hashfunc.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.30 2001/03/22 03:59:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.31 2002/02/25 04:06:47 momjian Exp $
*
* NOTES
* These functions are stored in pg_amproc. For each operator class
@@ -95,7 +95,7 @@ hashname(PG_FUNCTION_ARGS)
{
char *key = NameStr(*PG_GETARG_NAME(0));
- return hash_any((char *) key, NAMEDATALEN);
+ return hash_any(key, strlen(key));
}
/*
@@ -125,7 +125,7 @@ hashvarlena(PG_FUNCTION_ARGS)
*
* (Comment from the original db3 hashing code: )
*
- * "This is INCREDIBLY ugly, but fast. We break the string up into 8 byte
+ * This is INCREDIBLY ugly, but fast. We break the string up into 8 byte
* units. On the first time through the loop we get the 'leftover bytes'
* (strlen % 8). On every later iteration, we perform 8 HASHC's so we handle
* all 8 bytes. Essentially, this saves us 7 cmp & branch instructions. If
@@ -134,7 +134,7 @@ hashvarlena(PG_FUNCTION_ARGS)
* "OZ's original sdbm hash"
*/
Datum
-hash_any(char *keydata, int keylen)
+hash_any(const char *keydata, int keylen)
{
uint32 n;
int loop;