diff options
author | Luca Deri <deri@ntop.org> | 2022-05-29 16:39:50 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2022-05-29 16:40:16 +0200 |
commit | 406ac81a3706d13deb7834de64f401c6888e5b13 (patch) | |
tree | 465a6f30ba758ef45a43c6f109b2b02a2ac7d642 | |
parent | dfbe863f4e91090c35f69a334e7f74ee8e761143 (diff) |
Compilation fixes for old ggc's
-rw-r--r-- | src/lib/ndpi_main.c | 4 | ||||
-rw-r--r-- | src/lib/protocols/mpegdash.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 1a3f0acf6..5f5fd593d 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -5056,14 +5056,14 @@ static u_int32_t check_ndpi_subprotocols(struct ndpi_detection_module_struct * c NDPI_PROTOCOL_BITMASK detection_bitmask, u_int16_t detected_protocol) { - u_int32_t num_calls = 0; + u_int32_t num_calls = 0, a; if (detected_protocol == NDPI_PROTOCOL_UNKNOWN) { return num_calls; } - for (u_int32_t a = 0; a < ndpi_str->proto_defaults[detected_protocol].subprotocol_count; a++) + for (a = 0; a < ndpi_str->proto_defaults[detected_protocol].subprotocol_count; a++) { u_int16_t subproto_id = ndpi_str->proto_defaults[detected_protocol].subprotocols[a]; if (subproto_id == (uint16_t)NDPI_PROTOCOL_MATCHED_BY_CONTENT || diff --git a/src/lib/protocols/mpegdash.c b/src/lib/protocols/mpegdash.c index bc6fc8d44..6be2c1fe5 100644 --- a/src/lib/protocols/mpegdash.c +++ b/src/lib/protocols/mpegdash.c @@ -59,6 +59,8 @@ void ndpi_search_mpegdash_http(struct ndpi_detection_module_struct *ndpi_struct, if (packet->parsed_lines > 0) { + size_t i; + if (LINE_ENDS(packet->line[0], "RTSP/1.0") != 0 || LINE_ENDS(packet->line[0], ".mp4 HTTP/1.1") != 0 || LINE_ENDS(packet->line[0], ".m4s HTTP/1.1") != 0) @@ -67,7 +69,7 @@ void ndpi_search_mpegdash_http(struct ndpi_detection_module_struct *ndpi_struct, return; } - for (size_t i = 0; i < packet->parsed_lines && packet->line[i].len > 0; ++i) + for (i = 0; i < packet->parsed_lines && packet->line[i].len > 0; ++i) { if ((LINE_STARTS(packet->line[i], "Content-Type:") != 0 && LINE_ENDS(packet->line[i], "video/mp4") != 0) || |