aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2016-11-13 18:16:41 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-11-13 18:22:03 +0100
commit45bcb9927deaa4cdea2f2ac9a4d73aefba7c486b (patch)
treeef604d72a2c53ab8d974d4936f55c2e0bde20dec /src
parent612a07f4204885458afb3192482f964344efd736 (diff)
bittorrent: fix variable ‘peer_id’ set but not used [-Werror=unused-but-set-variable]
Diffstat (limited to 'src')
-rw-r--r--src/lib/protocols/bittorrent.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c
index 084f80be7..a88b1cce5 100644
--- a/src/lib/protocols/bittorrent.c
+++ b/src/lib/protocols/bittorrent.c
@@ -57,16 +57,15 @@ static void ndpi_add_connection_as_bittorrent(struct ndpi_detection_module_struc
{
if(check_hash) {
const char *bt_hash = NULL; /* 20 bytes long */
- const char *peer_id = NULL; /* 20 bytes long */
if(bt_offset == -1) {
const char *bt_magic = ndpi_strnstr((const char *)flow->packet.payload,
"BitTorrent protocol", flow->packet.payload_packet_len);
if(bt_magic)
- bt_hash = &bt_magic[19], peer_id = &bt_magic[39];
+ bt_hash = &bt_magic[19];
} else
- bt_hash = (const char*)&flow->packet.payload[28], peer_id = (const char*)&flow->packet.payload[48];
+ bt_hash = (const char*)&flow->packet.payload[28];
if(bt_hash) memcpy(flow->bittorent_hash, bt_hash, 20);
}