aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_analyze.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2022-08-17 16:25:10 +0200
committerLuca Deri <deri@ntop.org>2022-08-17 16:25:10 +0200
commita53f4765858285f520b8a2645da80aed2b1487b1 (patch)
treef86a674351755e578c1955cb5a5bf4f9c0699490 /src/lib/ndpi_analyze.c
parent82c83ef75e3a6a88dcfb9a9ad1bc1b888d893751 (diff)
Modified definition of hll_add
Diffstat (limited to 'src/lib/ndpi_analyze.c')
-rw-r--r--src/lib/ndpi_analyze.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/ndpi_analyze.c b/src/lib/ndpi_analyze.c
index a3c518051..2b5d46a90 100644
--- a/src/lib/ndpi_analyze.c
+++ b/src/lib/ndpi_analyze.c
@@ -290,12 +290,13 @@ void ndpi_hll_reset(struct ndpi_hll *hll) {
hll_reset(hll);
}
-void ndpi_hll_add(struct ndpi_hll *hll, const char *data, size_t data_len) {
- hll_add(hll, (const void *)data, data_len);
+int ndpi_hll_add(struct ndpi_hll *hll, const char *data, size_t data_len) {
+ return(hll_add(hll, (const void *)data, data_len));
}
-void ndpi_hll_add_number(struct ndpi_hll *hll, u_int32_t value) {
- hll_add(hll, (const void *)&value, sizeof(value));
+/* 1 = rank changed, 0 = no changes in rank */
+int ndpi_hll_add_number(struct ndpi_hll *hll, u_int32_t value) {
+ return(hll_add(hll, (const void *)&value, sizeof(value)));
}
double ndpi_hll_count(struct ndpi_hll *hll) {