simplify logic master
authorGeoffrey Allott <geoffrey@allott.email>
Sat, 7 Jan 2023 22:48:35 +0000 (22:48 +0000)
committerGeoffrey Allott <geoffrey@allott.email>
Sat, 7 Jan 2023 22:48:35 +0000 (22:48 +0000)
src/stree.c

index 05b262cd342da853e432579685eb95990f3bdd04..4ec3f5166e314dce4b18cdebfa09e85db52cd21e 100644 (file)
@@ -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)