refactor: follow style guide

- reduce variable scope
- prefer initialization over declaration and assignment
This commit is contained in:
dundargoc
2023-11-13 23:40:37 +01:00
committed by dundargoc
parent 1798a4b5e9
commit ac1113ded5
52 changed files with 713 additions and 1269 deletions

View File

@@ -430,11 +430,10 @@ void marktree_put_key(MarkTree *b, MTKey k)
if (!b->root) {
b->root = marktree_alloc_node(b, true);
}
MTNode *r, *s;
b->n_keys++;
r = b->root;
MTNode *r = b->root;
if (r->n == 2 * T - 1) {
s = marktree_alloc_node(b, true);
MTNode *s = marktree_alloc_node(b, true);
b->root = s; s->level = r->level + 1; s->n = 0;
s->ptr[0] = r;
r->parent = s;