Skip to content

Commit e5a0f70

Browse files
Chandra Pratapgitster
authored andcommitted
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 <[email protected]> Mentored-by: Christian Couder <[email protected]> Signed-off-by: Chandra Pratap <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8d94cfb commit e5a0f70

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

reftable/tree.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,20 @@ struct tree_node *tree_search(void *key, struct tree_node **rootp,
3939
void infix_walk(struct tree_node *t, void (*action)(void *arg, void *key),
4040
void *arg)
4141
{
42-
if (t->left) {
42+
if (t->left)
4343
infix_walk(t->left, action, arg);
44-
}
4544
action(arg, t->key);
46-
if (t->right) {
45+
if (t->right)
4746
infix_walk(t->right, action, arg);
48-
}
4947
}
5048

5149
void tree_free(struct tree_node *t)
5250
{
53-
if (!t) {
51+
if (!t)
5452
return;
55-
}
56-
if (t->left) {
53+
if (t->left)
5754
tree_free(t->left);
58-
}
59-
if (t->right) {
55+
if (t->right)
6056
tree_free(t->right);
61-
}
6257
reftable_free(t);
6358
}

0 commit comments

Comments
 (0)