Type data pointer variables as uint8_t.

This commit is contained in:
Justin Maggard
2014-04-25 14:30:38 -07:00
parent 381c4805e6
commit be5f4a50eb
8 changed files with 13 additions and 16 deletions

View File

@ -290,14 +290,14 @@ make_dir(char * path, mode_t mode)
/* Simple, efficient hash function from Daniel J. Bernstein */
unsigned int
DJBHash(const char *str, int len)
DJBHash(uint8_t *data, int len)
{
unsigned int hash = 5381;
unsigned int i = 0;
for(i = 0; i < len; str++, i++)
for(i = 0; i < len; data++, i++)
{
hash = ((hash << 5) + hash) + (*str);
hash = ((hash << 5) + hash) + (*data);
}
return hash;