aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-m68k.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-07-18 19:56:40 +0000
committerIan Lance Taylor <ian@airs.com>1996-07-18 19:56:40 +0000
commit091221ceea880013269f46e3bb2ad813927f2c55 (patch)
treefb10f46e1058ffdef585616d8854588b004db636 /gas/config/tc-m68k.c
parentf4fcd63fa019c739fdf9de4aa984c4de96d4becd (diff)
downloadgdb-091221ceea880013269f46e3bb2ad813927f2c55.zip
gdb-091221ceea880013269f46e3bb2ad813927f2c55.tar.gz
gdb-091221ceea880013269f46e3bb2ad813927f2c55.tar.bz2
* config/tc-m68k.c (m68k_ip): Use the correct length when
allocating space for the unsupported architecture error message.
Diffstat (limited to 'gas/config/tc-m68k.c')
-rw-r--r--gas/config/tc-m68k.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index fcd9baf..4e8938c 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -1561,7 +1561,7 @@ m68k_ip (instring)
&& !(ok_arch & current_architecture))
{
char buf[200], *cp;
- int len;
+
strcpy (buf,
"invalid instruction for this architecture; needs ");
cp = buf + strlen (buf);
@@ -1603,8 +1603,7 @@ m68k_ip (instring)
}
}
}
- len = cp - buf + 1;
- cp = malloc (len);
+ cp = xmalloc (strlen (buf) + 1);
strcpy (cp, buf);
the_ins.error = cp;
}