projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gcconfig.h - Add weak attribute to avoid __data_start undefined messages on dlopen
[mono.git]
/
mono
/
utils
/
mono-internal-hash.c
diff --git
a/mono/utils/mono-internal-hash.c
b/mono/utils/mono-internal-hash.c
index cd11dc5f9631409bf8a034894aaa5edb9b552017..10ee6de5d5904459a8356e41caaf6caf0ccae971 100644
(file)
--- a/
mono/utils/mono-internal-hash.c
+++ b/
mono/utils/mono-internal-hash.c
@@
-93,7
+93,8
@@
mono_internal_hash_table_insert (MonoInternalHashTable *table,
{
gint hash = HASH (key, table->hash_func, table->size);
{
gint hash = HASH (key, table->hash_func, table->size);
- g_assert(table->key_extract(value) == key);
+ g_assert (table->key_extract(value) == key);
+ g_assert (*(table->next_value (value)) == NULL);
g_assert (mono_internal_hash_table_lookup (table, key) == NULL);
*(table->next_value (value)) = table->table[hash];
g_assert (mono_internal_hash_table_lookup (table, key) == NULL);
*(table->next_value (value)) = table->table[hash];
@@
-115,9
+116,11
@@
mono_internal_hash_table_remove (MonoInternalHashTable *table, gpointer key)
value = table->next_value (*value)) {
if (table->key_extract (*value) == key)
{
value = table->next_value (*value)) {
if (table->key_extract (*value) == key)
{
- *value =
table->next_value (*value
);
+ *value =
*(table->next_value (*value)
);
--table->num_entries;
return;
}
}
--table->num_entries;
return;
}
}
+
+ g_assert (0);
}
}