summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2007-04-09 22:55:14 +0000
committerthompsa <thompsa@FreeBSD.org>2007-04-09 22:55:14 +0000
commit496a4e8d2f0fd318133eb3880e26ccc13cc92bbb (patch)
tree3e7a18e5db372dd1ce8aab831414009cd9b2675f
parent0daf602ef9b7c12a0a3f62c7bc4dbcb3236e8593 (diff)
downloadFreeBSD-src-496a4e8d2f0fd318133eb3880e26ccc13cc92bbb.zip
FreeBSD-src-496a4e8d2f0fd318133eb3880e26ccc13cc92bbb.tar.gz
Fix a compiler warning so hash.h can be included in the kernel. This changes
the args for hash32_stre and hash32_strne but there are no consumers in the base system and openbgpd does not use it which the initial import was for. Silence on: hackers
-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