From 139098c1882b03bd4571af03a5a7a6694f87e0dd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 6 Jun 2016 08:10:08 -0700 Subject: Fix cast to avoid potential wraparound --- src/core/lib/transport/metadata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 751305e5d7..79de54beb5 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -507,8 +507,8 @@ static void grow_mdtab(mdtab_shard *shard) { } static void rehash_mdtab(mdtab_shard *shard) { - if ((size_t)gpr_atm_no_barrier_load(&shard->free_estimate) > - shard->capacity / 4) { + if (gpr_atm_no_barrier_load(&shard->free_estimate) > + (gpr_atm)(shard->capacity / 4)) { gc_mdtab(shard); } else { grow_mdtab(shard); -- cgit v1.2.3