diff options
author | Thomas White <taw@physics.org> | 2011-02-08 14:48:14 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:13 +0100 |
commit | 606a2cd5432fe342d73ab8f37a1b383142c52fdb (patch) | |
tree | 69e1f6287ec2bb05ebf50f4592d5f4ad991ea7a3 /src | |
parent | 02452502fa887e8943196b02d270e7ad92462829 (diff) |
Don't return the pseudo-root when iterating
Diffstat (limited to 'src')
-rw-r--r-- | src/reflist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/reflist.c b/src/reflist.c index 2bb4e5f6..e543c20d 100644 --- a/src/reflist.c +++ b/src/reflist.c @@ -85,7 +85,8 @@ RefList *reflist_new() new = malloc(sizeof(struct _reflist)); - /* Create pseudo-root with invalid indices */ + /* Create pseudo-root with invalid indices. + * The "real" root will be the left child of this. */ new->head = new_node(SERIAL(257, 257, 257)); return new; @@ -345,7 +346,7 @@ void delete_refl(Reflection *refl) Reflection *first_refl(RefList *list) { - return list->head; + return list->head->child[0]; } |