diff options
author | Alan Modra <amodra@gmail.com> | 2006-04-28 04:07:33 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2006-04-28 04:07:33 +0000 |
commit | 001ae1a4ab8f9c277458b120b63b27d710708742 (patch) | |
tree | b59a0a3d77f6f6b820ff0b8df6eee1784c0101d0 /gas/dwarf2dbg.c | |
parent | bbe44800a5e40333e96e98ca84fb126f359523c6 (diff) | |
download | gdb-001ae1a4ab8f9c277458b120b63b27d710708742.zip gdb-001ae1a4ab8f9c277458b120b63b27d710708742.tar.gz gdb-001ae1a4ab8f9c277458b120b63b27d710708742.tar.bz2 |
* dwarf2dbg.c (get_line_subseg): Attach new struct line_seg to end
of list rather than beginning.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r-- | gas/dwarf2dbg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index 8194528..16666fa 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -209,21 +209,21 @@ get_line_subseg (segT seg, subsegT subseg) static subsegT last_subseg; static struct line_subseg *last_line_subseg; - struct line_seg *s; + struct line_seg **ps, *s; struct line_subseg **pss, *ss; if (seg == last_seg && subseg == last_subseg) return last_line_subseg; - for (s = all_segs; s; s = s->next) + for (ps = &all_segs; (s = *ps) != NULL; ps = &s->next) if (s->seg == seg) goto found_seg; s = (struct line_seg *) xmalloc (sizeof (*s)); - s->next = all_segs; + s->next = NULL; s->seg = seg; s->head = NULL; - all_segs = s; + *ps = s; found_seg: for (pss = &s->head; (ss = *pss) != NULL ; pss = &ss->next) |