aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gas/read.c b/gas/read.c
index a2ad4b6..cd06ea5 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -563,11 +563,14 @@ pop_insert (const pseudo_typeS *table)
const pseudo_typeS *pop;
for (pop = table; pop->poc_name; pop++)
{
- int exists = po_entry_find (po_hash, pop->poc_name) != NULL;
- if (!pop_override_ok && exists)
- as_fatal (_("error constructing %s pseudo-op table"), pop_table_name);
- else if (!exists)
- htab_insert (po_hash, po_entry_alloc (pop->poc_name, pop));
+ po_entry_t *elt = po_entry_alloc (pop->poc_name, pop);
+ if (htab_insert (po_hash, elt, 0) != NULL)
+ {
+ free (elt);
+ if (!pop_override_ok)
+ as_fatal (_("error constructing %s pseudo-op table"),
+ pop_table_name);
+ }
}
}