diff options
Diffstat (limited to 'src/peer_hashtable.c')
-rw-r--r-- | src/peer_hashtable.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/peer_hashtable.c b/src/peer_hashtable.c index b835ea9..321b0d5 100644 --- a/src/peer_hashtable.c +++ b/src/peer_hashtable.c @@ -44,11 +44,7 @@ void fastd_peer_hashtable_init(void) { fastd_random_bytes(&ctx.peer_addr_ht_seed, sizeof(ctx.peer_addr_ht_seed), false); - ctx.peer_addr_ht = fastd_new_array(PEER_ADDR_HT_SIZE, __typeof__(*ctx.peer_addr_ht)); - - size_t i; - for (i = 0; i < PEER_ADDR_HT_SIZE; i++) - VECTOR_ALLOC(ctx.peer_addr_ht[i], 0); + ctx.peer_addr_ht = fastd_new0_array(PEER_ADDR_HT_SIZE, __typeof__(*ctx.peer_addr_ht)); } /** Frees the resources used by the hashtable */ |