summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/man/man9/hash.96
-rw-r--r--sys/sys/hash.h9
2 files changed, 8 insertions, 7 deletions
diff --git a/share/man/man9/hash.9 b/share/man/man9/hash.9
index 8641320..d977ac3 100644
--- a/share/man/man9/hash.9
+++ b/share/man/man9/hash.9
@@ -26,7 +26,7 @@
.\" $OpenBSD: hash.9,v 1.5 2003/04/17 05:08:39 jmc Exp $
.\" $FreeBSD$
.\"
-.Dd October 19, 2006
+.Dd April 3, 2007
.Dt HASH 9
.Os
.Sh NAME
@@ -47,9 +47,9 @@
.Ft uint32_t
.Fn hash32_strn "const void *buf" "size_t len" "uint32_t hash"
.Ft uint32_t
-.Fn hash32_stre "const void *buf" "int end" "char **ep" "uint32_t hash"
+.Fn hash32_stre "const void *buf" "int end" "const char **ep" "uint32_t hash"
.Ft uint32_t
-.Fn hash32_strne "const void *buf" "size_t len" "int end" "char **ep" "uint32_t hash"
+.Fn hash32_strne "const void *buf" "size_t len" "int end" "const char **ep" "uint32_t hash"
.Sh DESCRIPTION
The
.Fn hash32
diff --git a/sys/sys/hash.h b/sys/sys/hash.h
index 6ce4fdc..6ad89c5 100644
--- a/sys/sys/hash.h
+++ b/sys/sys/hash.h
@@ -86,7 +86,7 @@ hash32_strn(const void *buf, size_t len, uint32_t hash)
* namei() hashing of path name parts.
*/
static __inline uint32_t
-hash32_stre(const void *buf, int end, char **ep, uint32_t hash)
+hash32_stre(const void *buf, int end, const char **ep, uint32_t hash)
{
const unsigned char *p = buf;
@@ -94,7 +94,7 @@ hash32_stre(const void *buf, int end, char **ep, uint32_t hash)
hash = HASHSTEP(hash, *p++);
if (ep)
- *ep = (char *)p;
+ *ep = p;
return hash;
}
@@ -105,7 +105,8 @@ hash32_stre(const void *buf, int end, char **ep, uint32_t hash)
* as a helper for the namei() hashing of path name parts.
*/
static __inline uint32_t
-hash32_strne(const void *buf, size_t len, int end, char **ep, uint32_t hash)
+hash32_strne(const void *buf, size_t len, int end, const char **ep,
+ uint32_t hash)
{
const unsigned char *p = buf;
@@ -113,7 +114,7 @@ hash32_strne(const void *buf, size_t len, int end, char **ep, uint32_t hash)
hash = HASHSTEP(hash, *p++);
if (ep)
- *ep = (char *)p;
+ *ep = p;
return hash;
}
OpenPOWER on IntegriCloud