diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-13 23:40:37 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-19 15:08:35 +0100 |
commit | ac1113ded5f8f09dd99a9894d7a7e795626fb728 (patch) | |
tree | 9cf615d03efafe2c44e539cb45f1b3df171b3e85 /src/nvim/marktree.c | |
parent | 1798a4b5e9f0ae56cd800095f79423fea5cae8ca (diff) | |
download | rneovim-ac1113ded5f8f09dd99a9894d7a7e795626fb728.tar.gz rneovim-ac1113ded5f8f09dd99a9894d7a7e795626fb728.tar.bz2 rneovim-ac1113ded5f8f09dd99a9894d7a7e795626fb728.zip |
refactor: follow style guide
- reduce variable scope
- prefer initialization over declaration and assignment
Diffstat (limited to 'src/nvim/marktree.c')
-rw-r--r-- | src/nvim/marktree.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/marktree.c b/src/nvim/marktree.c index 009c293d37..5cc3d3d3ee 100644 --- a/src/nvim/marktree.c +++ b/src/nvim/marktree.c @@ -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; |