summaryrefslogtreecommitdiff
path: root/examples/c-collectd
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2023-08-02 20:21:53 +0200
committerToni Uhlig <matzeton@googlemail.com>2023-08-02 21:00:39 +0200
commitebb439d959c9966345e0acc10ea6fa63635b5995 (patch)
treede4366f6dc8e2d1caf880f3d73f38c7b36d3fae7 /examples/c-collectd
parent79834df457ebc36158c8197a26c11b672993b3ea (diff)
Tiny improvments.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-collectd')
-rw-r--r--examples/c-collectd/c-collectd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/c-collectd/c-collectd.c b/examples/c-collectd/c-collectd.c
index 624672ef3..7ab62e919 100644
--- a/examples/c-collectd/c-collectd.c
+++ b/examples/c-collectd/c-collectd.c
@@ -738,7 +738,7 @@ static enum nDPIsrvd_callback_return collectd_json_callback(struct nDPIsrvd_sock
if (str_value_to_ull(TOKEN_GET_KEY(sock, current, NULL), &numeric_risk_value) == CONVERSION_OK)
{
- if ((flow_user_data->detected_risks & (1 << numeric_risk_value)) == 0)
+ if ((flow_user_data->detected_risks & (1ull << numeric_risk_value)) == 0)
{
if (numeric_risk_value < NDPI_MAX_RISK && numeric_risk_value > 0)
{
@@ -749,7 +749,7 @@ static enum nDPIsrvd_callback_return collectd_json_callback(struct nDPIsrvd_sock
collectd_statistics.flow_risk_unknown_count++;
}
- flow_user_data->detected_risks |= (1 << (numeric_risk_value - 1));
+ flow_user_data->detected_risks |= (1ull << (numeric_risk_value - 1));
}
}
}