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
This commit is contained in:
Andrew Thompson 2007-04-09 22:55:14 +00:00
parent 445eba04a8
commit 6429a5cb9b
2 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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;
}