git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/master' into isa/arm64
[lunaix-os.git]
/
lunaix-os
/
libs
/
hash.c
diff --git
a/lunaix-os/libs/hash.c
b/lunaix-os/libs/hash.c
index c1580edda5a51074ea9237abe709eeaddac55cb3..3a0555fee81e38d2e58af2ad7a3ba0c800ff0d5e 100644
(file)
--- a/
lunaix-os/libs/hash.c
+++ b/
lunaix-os/libs/hash.c
@@
-1,4
+1,5
@@
-#include <lib/hash.h>
+#include <klibc/hash.h>
+#include <lunaix/compiler.h>
/**
* @brief Simple string hash function
/**
* @brief Simple string hash function
@@
-8,13
+9,13
@@
* @param str
* @return unsigned int
*/
* @param str
* @return unsigned int
*/
-u
int32_t
-strhash_32(
unsigned char* str, uint
32_t truncate_to)
+u
32_t _weak
+strhash_32(
const char* str, u
32_t truncate_to)
{
if (!str)
return 0;
{
if (!str)
return 0;
- u
int
32_t hash = 5381;
+ u32_t hash = 5381;
int c;
while ((c = *str++))
int c;
while ((c = *str++))