summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/peer.c b/src/peer.c
index 324266a..528f560 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -213,19 +213,9 @@ static void delete_peer(fastd_context_t *ctx, fastd_peer_t *peer) {
fastd_peer_config_t* fastd_peer_config_new(fastd_context_t *ctx, fastd_config_t *conf) {
- fastd_peer_config_t *peer = malloc(sizeof(fastd_peer_config_t));
- peer->enabled = false;
+ fastd_peer_config_t *peer = calloc(1, sizeof(fastd_peer_config_t));
- peer->hostname = NULL;
- memset(&peer->address, 0, sizeof(fastd_peer_address_t));
- peer->dynamic_float = false;
-
- peer->config_source_dir = NULL;
-
- peer->name = NULL;
- peer->key = NULL;
peer->group = conf->peer_group;
- peer->protocol_config = NULL;
peer->next = conf->peers;
conf->peers = peer;