Add explicit casts for (const uint8_t *)

This commit is contained in:
matt 2014-09-05 05:46:15 +00:00
parent fe43b4fff7
commit 5da27df52f
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: hash.h,v 1.7 2012/07/08 01:24:08 rmind Exp $ */
/* $NetBSD: hash.h,v 1.8 2014/09/05 05:46:15 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -51,7 +51,7 @@
static __inline uint32_t
hash32_buf(const void *bf, size_t len, uint32_t hash)
{
const uint8_t *s = bf;
const uint8_t *s = (const uint8_t *)bf;
while (len-- != 0) /* "nemesi": k=257, r=r*257 */
hash = hash * 257 + *s++;
@ -72,7 +72,7 @@ hash32_buf(const void *bf, size_t len, uint32_t hash)
static __inline uint32_t
hash32_str(const void *bf, uint32_t hash)
{
const uint8_t *s = bf;
const uint8_t *s = (const uint8_t *)bf;
uint8_t c;
while ((c = *s++) != 0)
@ -90,7 +90,7 @@ hash32_str(const void *bf, uint32_t hash)
static __inline uint32_t
hash32_strn(const void *bf, size_t len, uint32_t hash)
{
const uint8_t *s = bf;
const uint8_t *s = (const uint8_t *)bf;
uint8_t c;
while ((c = *s++) != 0 && len-- != 0)