summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-01-03 23:31:41 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2023-01-03 23:31:41 +0100
commitd31f74b14c66f5674b2e2f29730edd34ac95d2df (patch)
treed67fd417adf5d59b6e890053adfe73206de236e2 /src/main.c
parentremoved non-ASCII bytes from JSON output (diff)
downloadtravnik-d31f74b14c66f5674b2e2f29730edd34ac95d2df.tar
travnik-d31f74b14c66f5674b2e2f29730edd34ac95d2df.tar.gz
travnik-d31f74b14c66f5674b2e2f29730edd34ac95d2df.tar.bz2
travnik-d31f74b14c66f5674b2e2f29730edd34ac95d2df.tar.lz
travnik-d31f74b14c66f5674b2e2f29730edd34ac95d2df.tar.xz
travnik-d31f74b14c66f5674b2e2f29730edd34ac95d2df.tar.zst
travnik-d31f74b14c66f5674b2e2f29730edd34ac95d2df.zip
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);