[Crosstoolchain-logs] [device-tree-compiler] 29/357: Alter add_property() and add_child() functiosn to add to the end of their respective linked lists. This means we no longer reverse the order or properties and subnodes when in blob or fs input modes.
Hector Oron
zumbi at moszumanska.debian.org
Thu Dec 8 17:05:45 UTC 2016
This is an automated email from the git hooks/post-receive script.
zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.
commit 740a19a81905ff04710f4a154c0c9277e72d7c74
Author: David Gibson <dgibson at sneetch.(none)>
Date: Fri Oct 21 17:26:45 2005 +1000
Alter add_property() and add_child() functiosn to add to the end of their
respective linked lists. This means we no longer reverse the order or
properties and subnodes when in blob or fs input modes.
---
livetree.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/livetree.c b/livetree.c
index 5b07680..6a1f4f9 100644
--- a/livetree.c
+++ b/livetree.c
@@ -84,12 +84,28 @@ struct node *chain_node(struct node *first, struct node *list)
void add_property(struct node *node, struct property *prop)
{
- node->proplist = chain_property(prop, node->proplist);
+ struct property **p;
+
+ prop->next = NULL;
+
+ p = &node->proplist;
+ while (*p)
+ p = &((*p)->next);
+
+ *p = prop;
}
void add_child(struct node *parent, struct node *child)
{
- parent->children = chain_node(child, parent->children);
+ struct node **p;
+
+ child->next_sibling = NULL;
+
+ p = &parent->children;
+ while (*p)
+ p = &((*p)->next_sibling);
+
+ *p = child;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list