From c8df9a9d46610502c467e2b2b3e2a91e73b30dba Mon Sep 17 00:00:00 2001 From: Geoffrey Allott Date: Sat, 7 Jan 2023 22:48:35 +0000 Subject: [PATCH] simplify logic --- src/stree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/stree.c b/src/stree.c index 05b262c..4ec3f51 100644 --- a/src/stree.c +++ b/src/stree.c @@ -41,11 +41,8 @@ void node_dbg(const struct node *self, const struct node *root, size_t indent, c static void node_add_son(struct node *self, struct node *son) { - struct node *brother; - - brother = self->son; + son->brother = self->son; self->son = son; - son->brother = brother; } static void node_split_son(struct node *self, struct node *edge, struct node *split, struct node *son, size_t len) -- 2.34.1