summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2023-07-13 18:52:14 +0300
committerGitHub <noreply@github.com>2023-07-13 18:52:14 +0300
commit3d895d97c8c6dd0c49159945430a411df455ac23 (patch)
tree767c255659304ebc3e03b022403878f0ddc0653e /database
parentaa40a352108eb0af242600599304e555d0f34945 (diff)
Fix CodeQL alert (#15384)
Fix CodeQL alert -- Multiplication result converted to larger type
Diffstat (limited to 'database')
-rw-r--r--database/rrdhost.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/database/rrdhost.c b/database/rrdhost.c
index 4c4f8c2cae..d49813c6bd 100644
--- a/database/rrdhost.c
+++ b/database/rrdhost.c
@@ -353,8 +353,8 @@ int is_legacy = 1;
case RRD_MEMORY_MODE_MAP:
case RRD_MEMORY_MODE_SAVE:
case RRD_MEMORY_MODE_RAM:
- if(host->rrdpush_seconds_to_replicate > host->rrd_history_entries * host->rrd_update_every)
- host->rrdpush_seconds_to_replicate = host->rrd_history_entries * host->rrd_update_every;
+ if(host->rrdpush_seconds_to_replicate > (time_t) host->rrd_history_entries * (time_t) host->rrd_update_every)
+ host->rrdpush_seconds_to_replicate = (time_t) host->rrd_history_entries * (time_t) host->rrd_update_every;
break;
case RRD_MEMORY_MODE_DBENGINE: