diff options
author | hongyu <hongyu@google.com> | 2015-01-12 13:49:25 -0800 |
---|---|---|
committer | Nicolas Noble <nnoble@google.com> | 2015-01-12 14:11:52 -0800 |
commit | 99e317a8f8c9f71ede5fc2587589aa60989d3dac (patch) | |
tree | 9ae56a6eaabc96ac197b71da24dc71560b39f99b /src/core | |
parent | d74729d8c78ab50d0219f03e831f1aabcbad0b15 (diff) |
grpc census hash_table test coverage improvements.
Change on 2015/01/12 by hongyu <hongyu@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83786701
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/statistics/hash_table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/statistics/hash_table.c b/src/core/statistics/hash_table.c index f0105ee683..1aee86d3a4 100644 --- a/src/core/statistics/hash_table.c +++ b/src/core/statistics/hash_table.c @@ -141,10 +141,10 @@ static gpr_int32 find_bucket_idx(const census_ht* ht, census_ht_key key) { static int keys_match(const census_ht_option* opt, const ht_entry* p, const census_ht_key key) { + GPR_ASSERT(opt->key_type == CENSUS_HT_UINT64 || + opt->key_type == CENSUS_HT_POINTER); if (opt->key_type == CENSUS_HT_UINT64) return p->key.val == key.val; - if (opt->key_type == CENSUS_HT_POINTER) - return !opt->compare_keys((p->key).ptr, key.ptr); - return 0; + return !opt->compare_keys((p->key).ptr, key.ptr); } static entry_locator ht_find(const census_ht* ht, census_ht_key key) { |