aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorToni <matzeton@googlemail.com>2023-11-09 10:16:57 +0100
committerGitHub <noreply@github.com>2023-11-09 10:16:57 +0100
commit0673da54b5db6be849e5ad3b22e80f3cadfccca9 (patch)
tree68d7a2ccf7d69657c5c02fc0499da3541a9516f2 /src
parentb539b0d0902bc0fda235d8bbf1bc7f64e9028465 (diff)
Fixed implicit u32 cast in `ndpi_data_min()` / `ndpi_data_max()`. (#2139)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_api.h4
-rw-r--r--src/lib/ndpi_analyze.c4
2 files changed, 4 insertions, 4 deletions
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); }
/* ********************************************************************************* */