From 9bf09f37d8e4e91c4ad9dd2790194fdf74abafab Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Wed, 8 Nov 2023 22:54:30 +0100 Subject: Fixed implicit u32 cast in `ndpi_data_min()` / `ndpi_data_max()`. Signed-off-by: Toni Uhlig --- src/include/ndpi_api.h | 4 ++-- src/lib/ndpi_analyze.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index d7bb344ab..9621f8e37 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -1780,8 +1780,8 @@ extern "C" { float ndpi_data_stddev(struct ndpi_analyze_struct *s); float ndpi_data_mean(struct ndpi_analyze_struct *s); u_int64_t ndpi_data_last(struct ndpi_analyze_struct *s); - u_int32_t ndpi_data_min(struct ndpi_analyze_struct *s); - u_int32_t ndpi_data_max(struct ndpi_analyze_struct *s); + u_int64_t ndpi_data_min(struct ndpi_analyze_struct *s); + u_int64_t ndpi_data_max(struct ndpi_analyze_struct *s); float ndpi_data_ratio(u_int32_t sent, u_int32_t rcvd); /* ******************************* */ diff --git a/src/lib/ndpi_analyze.c b/src/lib/ndpi_analyze.c index f6d828107..c905139f8 100644 --- a/src/lib/ndpi_analyze.c +++ b/src/lib/ndpi_analyze.c @@ -150,8 +150,8 @@ u_int64_t ndpi_data_last(struct ndpi_analyze_struct *s) { } /* Return min/max on all values */ -u_int32_t ndpi_data_min(struct ndpi_analyze_struct *s) { return(s ? s->min_val : 0); } -u_int32_t ndpi_data_max(struct ndpi_analyze_struct *s) { return(s ? s->max_val : 0); } +u_int64_t ndpi_data_min(struct ndpi_analyze_struct *s) { return(s ? s->min_val : 0); } +u_int64_t ndpi_data_max(struct ndpi_analyze_struct *s) { return(s ? s->max_val : 0); } /* ********************************************************************************* */ -- cgit v1.2.3