projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Send one MTU probe at a time.
[tinc]
/
src
/
hash.c
diff --git
a/src/hash.c
b/src/hash.c
index
8fb9ca6
..
91fc3d6
100644
(file)
--- a/
src/hash.c
+++ b/
src/hash.c
@@
-91,6
+91,13
@@
void *hash_search_or_insert(hash_t *hash, const void *key, const void *value) {
return NULL;
}
+/* Deleting */
+
+void hash_delete(hash_t *hash, const void *key) {
+ uint32_t i = modulo(hash_function(key, hash->size), hash->n);
+ hash->values[i] = NULL;
+}
+
/* Utility functions */
void hash_clear(hash_t *hash) {