aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-xtensa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-xtensa.c')
-rw-r--r--gas/config/tc-xtensa.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index 663c531..9340e4d 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -9690,12 +9690,12 @@ xtensa_remove_section (segT sec)
/* Handle brain-dead bfd_section_list_remove macro, which
expect the address of the prior section's "next" field, not
just the address of the section to remove. */
+ segT ps_next_ptr = stdoutput->sections;
- segT *ps_next_ptr = &stdoutput->sections;
- while (*ps_next_ptr != sec && *ps_next_ptr != NULL)
- ps_next_ptr = &(*ps_next_ptr)->next;
+ while (ps_next_ptr != sec && ps_next_ptr != NULL)
+ ps_next_ptr = ps_next_ptr->next;
- assert (*ps_next_ptr != NULL);
+ assert (ps_next_ptr != NULL);
bfd_section_list_remove (stdoutput, ps_next_ptr);
}
@@ -9704,13 +9704,14 @@ xtensa_remove_section (segT sec)
static void
xtensa_insert_section (segT after_sec, segT sec)
{
- segT *after_sec_next;
+ segT after_sec_next;
+
if (after_sec == NULL)
- after_sec_next = &stdoutput->sections;
+ after_sec_next = stdoutput->sections;
else
- after_sec_next = &after_sec->next;
+ after_sec_next = after_sec->next;
- bfd_section_list_insert (stdoutput, after_sec_next, sec);
+ bfd_section_list_insert_after (stdoutput, after_sec_next, sec);
}