aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-nds32.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-nds32.c')
-rw-r--r--gas/config/tc-nds32.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c
index 3ad227b..48893a5 100644
--- a/gas/config/tc-nds32.c
+++ b/gas/config/tc-nds32.c
@@ -4284,20 +4284,17 @@ nds32_relax_hint (int mode ATTRIBUTE_UNUSED)
relocs = str_hash_find (nds32_hint_hash, name);
if (relocs == NULL)
{
- relocs = XNEW (struct nds32_relocs_pattern);
- memset (relocs, 0, sizeof (struct nds32_relocs_pattern));
+ relocs = notes_calloc (1, sizeof (*relocs));
str_hash_insert (nds32_hint_hash, name, relocs, 0);
}
else
{
while (relocs->next)
- relocs=relocs->next;
- relocs->next = XNEW (struct nds32_relocs_pattern);
+ relocs = relocs->next;
+ relocs->next = notes_calloc (1, sizeof (*relocs));
relocs = relocs->next;
- memset (relocs, 0, sizeof (struct nds32_relocs_pattern));
}
- relocs->next = NULL;
*input_line_pointer = saved_char;
ignore_rest_of_line ();