aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-tic4x.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-tic4x.c')
-rw-r--r--gas/config/tc-tic4x.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gas/config/tc-tic4x.c b/gas/config/tc-tic4x.c
index 956ea5d..a833c52 100644
--- a/gas/config/tc-tic4x.c
+++ b/gas/config/tc-tic4x.c
@@ -713,7 +713,6 @@ tic4x_asg (int x ATTRIBUTE_UNUSED)
char c;
char *name;
char *str;
- char *tmp;
SKIP_WHITESPACE ();
str = input_line_pointer;
@@ -728,12 +727,8 @@ tic4x_asg (int x ATTRIBUTE_UNUSED)
}
*input_line_pointer++ = '\0';
c = get_symbol_name (&name); /* Get terminator. */
- tmp = xmalloc (strlen (str) + 1);
- strcpy (tmp, str);
- str = tmp;
- tmp = xmalloc (strlen (name) + 1);
- strcpy (tmp, name);
- name = tmp;
+ str = xstrdup (str);
+ name = xstrdup (name);
if (hash_find (tic4x_asg_hash, name))
hash_replace (tic4x_asg_hash, name, (void *) str);
else