mirror of https://github.com/citusdata/citus.git
Possible undefined behavior for bit shift in citus_stat_tenants.c
parent
8a8a493b67
commit
4fec8e2138
|
@ -609,6 +609,7 @@ ReduceScoreIfNecessary(TenantStats *tenantStats, TimestampTz queryTime)
|
|||
if (periodCountAfterLastScoreReduction > 0)
|
||||
{
|
||||
tenantStats->lastScoreReduction = queryTime;
|
||||
|
||||
/*addtional check to avoid undefined behavior */
|
||||
tenantStats->score = (periodCountAfterLastScoreReduction <
|
||||
TENANTS_STATS_FIELD_BIT_LENGTH(tenantStats, score))
|
||||
|
|
Loading…
Reference in New Issue