Refinement on documentation (#38)
[lunaix-os.git] / lunaix-os / libs / hash.c
index 277efb32eaf8370fc8f265ef8038ce4d1960004f..b4e5c6f58910f57545aaaf0d36f4cd07722e7c4e 100644 (file)
@@ -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
  */
-uint32_t
-strhash_32(char* str, uint32_t truncate_to)
+u32_t weak
+strhash_32(const char* str, u32_t truncate_to)
 {
     if (!str)
         return 0;
 
 {
     if (!str)
         return 0;
 
-    uint32_t hash = 5381;
+    u32_t hash = 5381;
     int c;
 
     while ((c = *str++))
     int c;
 
     while ((c = *str++))