mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Merge remote-tracking branch 'gvdb/master'
This commit is contained in:
commit
1b03391984
@ -93,7 +93,7 @@ djb_hash (const gchar *key)
|
|||||||
guint32 hash_value = 5381;
|
guint32 hash_value = 5381;
|
||||||
|
|
||||||
while (*key)
|
while (*key)
|
||||||
hash_value = hash_value * 33 + *key++;
|
hash_value = hash_value * 33 + *(signed char *)key++;
|
||||||
|
|
||||||
return hash_value;
|
return hash_value;
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ gvdb_table_lookup (GvdbTable *file,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (key_length = 0; key[key_length]; key_length++)
|
for (key_length = 0; key[key_length]; key_length++)
|
||||||
hash_value = (hash_value * 33) + key[key_length];
|
hash_value = (hash_value * 33) + ((signed char *) key)[key_length];
|
||||||
|
|
||||||
if (!gvdb_table_bloom_filter (file, hash_value))
|
if (!gvdb_table_bloom_filter (file, hash_value))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user