projects
/
oweals
/
tinc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Throttle the rate of UDP_INFO messages.
[oweals/tinc.git]
/
src
/
hash.c
diff --git
a/src/hash.c
b/src/hash.c
index 8fb9ca69fd7f5e20b403a74052f733681b605c05..91fc3d6754341c0d738b802ce925cb7522268991 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) {