mirror of
https://github.com/git/git.git
synced 2025-09-10 22:44:50 +02:00
reftable: remove unnecessary curly braces in reftable/tree.c
According to Documentation/CodingGuidelines, single-line control-flow statements must omit curly braces (except for some special cases). Make reftable/tree.c adhere to this guideline. Mentored-by: Patrick Steinhardt <ps@pks.im> Mentored-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
8d94cfb545
commit
e5a0f7076f
@@ -39,25 +39,20 @@ struct tree_node *tree_search(void *key, struct tree_node **rootp,
|
||||
void infix_walk(struct tree_node *t, void (*action)(void *arg, void *key),
|
||||
void *arg)
|
||||
{
|
||||
if (t->left) {
|
||||
if (t->left)
|
||||
infix_walk(t->left, action, arg);
|
||||
}
|
||||
action(arg, t->key);
|
||||
if (t->right) {
|
||||
if (t->right)
|
||||
infix_walk(t->right, action, arg);
|
||||
}
|
||||
}
|
||||
|
||||
void tree_free(struct tree_node *t)
|
||||
{
|
||||
if (!t) {
|
||||
if (!t)
|
||||
return;
|
||||
}
|
||||
if (t->left) {
|
||||
if (t->left)
|
||||
tree_free(t->left);
|
||||
}
|
||||
if (t->right) {
|
||||
if (t->right)
|
||||
tree_free(t->right);
|
||||
}
|
||||
reftable_free(t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user