summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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