summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index e659e6b..70b4d3e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -85,7 +85,7 @@ int main (int argc, char ** argv) {
dht = dht_init(config);
dht->possible_torrent = found_torrent;
free_bencoding(config);
- struct torrent * torrent = calloc(1, sizeof *torrent);
+ struct torrent * torrent = torrent_init();
memcpy(torrent->hash, "\xdd\x82\x55\xec\xdc\x7c\xa5\x5f\xb0\xbb\xf8\x13\x23\xd8\x70\x62\xdb\x1f\x6d\x1c", 20);
torrent->type = announce | peers;
add_torrent(dht, torrent);