diff options
author | Craig Tiller <ctiller@google.com> | 2015-11-23 15:39:32 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-11-23 15:39:32 -0800 |
commit | 3328a5828fda9b56d6f72471878a735bc5583008 (patch) | |
tree | d0f66673ccf20499d7fd170d7ec00c23b9e1be2e /src | |
parent | 22d11e1a7646f78897b77f8bc0051fc10d459e89 (diff) |
clang-format
Diffstat (limited to 'src')
-rw-r--r-- | src/core/support/avl.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/support/avl.c b/src/core/support/avl.c index 28b4eb9f42..9734c9987f 100644 --- a/src/core/support/avl.c +++ b/src/core/support/avl.c @@ -206,9 +206,9 @@ static gpr_avl_node *add(const gpr_avl_vtable *vtable, gpr_avl_node *node, if (cmp == 0) { return new_node(key, value, ref_node(node->left), ref_node(node->right)); } else if (cmp > 0) { - return rebalance(vtable, vtable->copy_key(node->key), - vtable->copy_value(node->value), - add(vtable, node->left, key, value), ref_node(node->right)); + return rebalance( + vtable, vtable->copy_key(node->key), vtable->copy_value(node->value), + add(vtable, node->left, key, value), ref_node(node->right)); } else { return rebalance(vtable, vtable->copy_key(node->key), vtable->copy_value(node->value), ref_node(node->left), @@ -253,11 +253,13 @@ static gpr_avl_node *remove(const gpr_avl_vtable *vtable, gpr_avl_node *node, } else if (node->left->height < node->right->height) { gpr_avl_node *h = in_order_head(node->right); return rebalance(vtable, vtable->copy_key(h->key), - vtable->copy_value(h->value), ref_node(node->left), remove(vtable, node->right, h->key)); + vtable->copy_value(h->value), ref_node(node->left), + remove(vtable, node->right, h->key)); } else { gpr_avl_node *h = in_order_tail(node->left); - return rebalance(vtable, vtable->copy_key(h->key), - vtable->copy_value(h->value), remove(vtable, node->left, h->key), ref_node(node->right)); + return rebalance( + vtable, vtable->copy_key(h->key), vtable->copy_value(h->value), + remove(vtable, node->left, h->key), ref_node(node->right)); } } else if (cmp > 0) { return rebalance(vtable, vtable->copy_key(node->key), |