summaryrefslogtreecommitdiff
path: root/upb/table.c
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2016-01-26 15:11:53 -0800
committerJosh Haberman <jhaberman@gmail.com>2016-01-26 15:11:53 -0800
commitae8d257985a86772af614faad38c289aea7cae9c (patch)
treeb2381fc70fa2413ac776ed58f947d69ea171f5d2 /upb/table.c
parent0d18e1f7e3e43e34c44e46fd609da40c95d9e3e3 (diff)
Added small explanatory comment.
Diffstat (limited to 'upb/table.c')
-rw-r--r--upb/table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/upb/table.c b/upb/table.c
index 1fb7fb1..2f58659 100644
--- a/upb/table.c
+++ b/upb/table.c
@@ -622,7 +622,7 @@ void upb_inttable_compact(upb_inttable *t) {
{
/* Insert all elements into new, perfectly-sized table. */
- size_t arr_size = max[size_lg2] + 1;
+ size_t arr_size = max[size_lg2] + 1; /* +1 so arr[max] will fit. */
size_t hash_count = upb_inttable_count(t) - arr_count;
size_t hash_size = hash_count ? (hash_count / MAX_LOAD) + 1 : 0;
size_t hashsize_lg2 = log2ceil(hash_size);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback