diff options
author | Oleg A. Arkhangelsky <sysoleg@yandex.ru> | 2019-10-29 21:23:42 +0300 |
---|---|---|
committer | Oleg A. Arkhangelsky <sysoleg@yandex.ru> | 2019-10-29 21:23:42 +0300 |
commit | dfd962a8bc09286e426d728d65ae37bf2f122257 (patch) | |
tree | 73fd819ca15d1f92bcd610c37b036fbacd757f99 | |
parent | d2f04f5bdfe986082ca5e5f479a99e4c24a5a898 (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.c | 2 |
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() */ |