diff options
author | Toni <matzeton@googlemail.com> | 2022-09-04 19:19:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-04 19:19:05 +0200 |
commit | b7c103080493f93b2594b878656076d238211ba0 (patch) | |
tree | 8505f951b70e5a341ad1a20536f9fc9c0a717300 /src/lib/ndpi_classify.c | |
parent | b9cb3917564404367f35f54eafaaab1e28ce266f (diff) |
Fix broken ndpi_timeval_to_(milli|micro)seconds (>UINT_MAX). (#1720)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/lib/ndpi_classify.c')
-rw-r--r-- | src/lib/ndpi_classify.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/ndpi_classify.c b/src/lib/ndpi_classify.c index 61756cc16..e94bf2872 100644 --- a/src/lib/ndpi_classify.c +++ b/src/lib/ndpi_classify.c @@ -657,24 +657,24 @@ ndpi_timer_clear(pkt_timeval *a) /** * \brief Calculate the milliseconds representation of a timeval. * \param ts Timeval - * \return unsigned int - Milliseconds + * \return unsigned int (64bit) - Milliseconds */ -unsigned int +u_int64_t ndpi_timeval_to_milliseconds(pkt_timeval ts) { - unsigned int result = ts.tv_usec / 1000 + ts.tv_sec * 1000; + u_int64_t result = ts.tv_usec / 1000 + ts.tv_sec * 1000; return result; } /** * \brief Calculate the microseconds representation of a timeval. * \param ts Timeval - * \return unsigned int - Milliseconds + * \return unsigned int (64bit) - Microseconds */ -unsigned int +u_int64_t ndpi_timeval_to_microseconds(pkt_timeval ts) { - unsigned int result = ts.tv_usec + ts.tv_sec * 1000 * 1000; + u_int64_t result = ts.tv_usec + ts.tv_sec * 1000 * 1000; return result; } |