Skip to content

Commit be7e07a

Browse files
committed
mon/OSDMonitor.cc: fix UNINTENDED_INTEGER_DIVISION
Fix for: CID 1297885 (#1 of 2): Result is not floating-point (UNINTENDED_INTEGER_DIVISION) integer_division: Dividing integer expressions g_conf->mon_pool_quota_warn_threshold and 100, and then converting the integer quotient to type float. Any remainder, or fractional part of the quotient, is ignored. CID 1297885 (#2 of 2): Result is not floating-point (UNINTENDED_INTEGER_DIVISION) integer_division: Dividing integer expressions g_conf->mon_pool_quota_crit_threshold and 100, and then converting the integer quotient to type float. Any remainder, or fractional part of the quotient, is ignored. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
1 parent 268923c commit be7e07a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mon/OSDMonitor.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3896,8 +3896,8 @@ void OSDMonitor::get_pools_health(
38963896
detail->push_back(make_pair(HEALTH_WARN, ss.str()));
38973897
}
38983898

3899-
float warn_threshold = g_conf->mon_pool_quota_warn_threshold/100;
3900-
float crit_threshold = g_conf->mon_pool_quota_crit_threshold/100;
3899+
float warn_threshold = (float)g_conf->mon_pool_quota_warn_threshold/100;
3900+
float crit_threshold = (float)g_conf->mon_pool_quota_crit_threshold/100;
39013901

39023902
if (pool.quota_max_objects > 0) {
39033903
stringstream ss;

0 commit comments

Comments
 (0)