aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-10-03 17:14:40 +0200
committerLuca Deri <deri@ntop.org>2020-10-03 17:14:40 +0200
commit32e4922c5aa203a3f250b3048cd5488c77ee1a04 (patch)
treed7b1343b3db88b27e50ecb65ed0dd1b9dac705ca
parentd4d82c27a55ecf051b4805c8b2c7df56d52fcc98 (diff)
Warning fix
-rw-r--r--example/reader_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index d1850902d..7b1b6f271 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -1075,7 +1075,8 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
}
/* MDNS */
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_MDNS)) {
- snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->host_server_name);
+ char *name = flow->ndpi_flow->host_server_name; /* Trick to avoid warning(s) */
+ snprintf(flow->info, sizeof(flow->info), "%s", name);
}
/* UBNTAC2 */
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_UBNTAC2)) {