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)
|
if (periodCountAfterLastScoreReduction > 0)
|
||||||
{
|
{
|
||||||
tenantStats->lastScoreReduction = queryTime;
|
tenantStats->lastScoreReduction = queryTime;
|
||||||
|
|
||||||
/*addtional check to avoid undefined behavior */
|
/*addtional check to avoid undefined behavior */
|
||||||
tenantStats->score = (periodCountAfterLastScoreReduction <
|
tenantStats->score = (periodCountAfterLastScoreReduction <
|
||||||
TENANTS_STATS_FIELD_BIT_LENGTH(tenantStats, score))
|
TENANTS_STATS_FIELD_BIT_LENGTH(tenantStats, score))
|
||||||
|
|
Loading…
Reference in New Issue