aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg A. Arkhangelsky <sysoleg@yandex.ru>2019-10-29 21:23:42 +0300
committerOleg A. Arkhangelsky <sysoleg@yandex.ru>2019-10-29 21:23:42 +0300
commitdfd962a8bc09286e426d728d65ae37bf2f122257 (patch)
tree73fd819ca15d1f92bcd610c37b036fbacd757f99
parentd2f04f5bdfe986082ca5e5f479a99e4c24a5a898 (diff)
Change type
Use double type instead of float when printing time for CSV file. Float type is too small for 64 bit int time so cast corrupts value.
-rw-r--r--example/ndpiReader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index a5481d342..b8d914d08 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1011,7 +1011,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
if(csv_fp != NULL) {
float data_ratio = ndpi_data_ratio(flow->src2dst_bytes, flow->dst2src_bytes);
- float f = (float)flow->first_seen, l = (float)flow->last_seen;
+ double f = (double)flow->first_seen, l = (double)flow->last_seen;
/* PLEASE KEEP IN SYNC WITH printCSVHeader() */