aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-06-06 08:10:08 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-06-06 08:10:08 -0700
commit139098c1882b03bd4571af03a5a7a6694f87e0dd (patch)
tree5a3bc93e7658f16e021e38132e7f454c431b9d40 /src
parent8d8f9a891baebde4146f85f6c82d0372469f3b33 (diff)
Fix cast to avoid potential wraparound
Diffstat (limited to 'src')
-rw-r--r--src/core/lib/transport/metadata.c4
1 files changed, 2 insertions, 2 deletions
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);