diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lib/transport/static_metadata.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c index 807adfef54..5adc3216c9 100644 --- a/src/core/lib/transport/static_metadata.c +++ b/src/core/lib/transport/static_metadata.c @@ -440,7 +440,12 @@ static uint32_t elems_phash(uint32_t i) { i -= 42; uint32_t x = i % 96; uint32_t y = i / 96; - return y < GPR_ARRAY_SIZE(elems_r) ? x + (uint32_t)elems_r[y] : 0; + uint32_t h = x; + if (y < GPR_ARRAY_SIZE(elems_r)) { + uint32_t delta = (uint32_t)elems_r[y]; + h += delta; + } + return h; } static const uint16_t elem_keys[] = { |