Fix: stale dnode caching instance cause locked-up upon accessing (#52)
[lunaix-os.git] / lunaix-os / includes / lunaix / ds / hstr.h
index f43a6db24904d443469c281e726394832d0b6584..77096aa8a845f6c35dbb0d0152bb94f61734dd1c 100644 (file)
@@ -7,8 +7,8 @@
 
 struct hstr
 {
-    u32_t hash;
-    u32_t len;
+    unsigned int hash;
+    unsigned int len;
     const char* value;
 };
 
@@ -30,7 +30,7 @@ struct hstr
 #define HSTR_LEN(hstr)  ((hstr).len)
 #define HSTR_HASH(hstr) ((hstr).hash)
 
-inline void
+static inline void
 hstr_rehash(struct hstr* hash_str, u32_t truncate_to)
 {
     hash_str->hash = strhash_32(hash_str->value, truncate_to);