aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/hash.h
diff options
context:
space:
mode:
authorAndrew Thompson <thompsa@FreeBSD.org>2007-04-09 22:55:14 +0000
committerAndrew Thompson <thompsa@FreeBSD.org>2007-04-09 22:55:14 +0000
commit6429a5cb9bc276c8d79a1e6efeb3047a96e78f84 (patch)
tree3e7a18e5db372dd1ce8aab831414009cd9b2675f /sys/sys/hash.h
parent445eba04a8a13d7be015d8fb410b2d8824df13fd (diff)
downloadsrc-6429a5cb9bc276c8d79a1e6efeb3047a96e78f84.tar.gz
src-6429a5cb9bc276c8d79a1e6efeb3047a96e78f84.zip
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
Notes
Notes: svn path=/head/; revision=168557
Diffstat (limited to 'sys/sys/hash.h')
-rw-r--r--sys/sys/hash.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/sys/hash.h b/sys/sys/hash.h
index 6ce4fdc169de..6ad89c5ef905 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;
}