Index: uspace/lib/c/include/adt/hash.h
===================================================================
--- uspace/lib/c/include/adt/hash.h	(revision aa0faecad659b4889d43d910a125a6f6514b3804)
+++ uspace/lib/c/include/adt/hash.h	(revision a73aaec1377f591ca7758369aabdeb8caf4dfecc)
@@ -115,17 +115,17 @@
  * TODO Modify also same file in kernel subtree?
  *
- * @param[in]  str     NULL-terminated string (not NULL)
+ * @param[in]  str     NULL-terminated string
+ * @return hash of the given string
  */
 static inline size_t hash_string(const char *str)
 {
-	/*
-	 * Using djb2 function
-	 * http://www.cse.yorku.ca/~oz/hash.html
-	 */
-	size_t hash = 5381;
-	char c;
-	while ((c = *str++)) {
-		hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
+	size_t hash = 0;
+	if (str != NULL) {
+		char c;
+		while ((c = *str++) != 0) {
+			hash = hash_combine(hash, c);
+		}
 	}
+
 	return hash;
 }
