* config/tc-m68k.c (m68k_ip): Use the correct length when
authorIan Lance Taylor <ian@airs.com>
Thu, 18 Jul 1996 19:56:40 +0000 (19:56 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 18 Jul 1996 19:56:40 +0000 (19:56 +0000)
allocating space for the unsupported architecture error message.

gas/ChangeLog
gas/config/tc-m68k.c

index 85ddff7bec2aeeaea28882cdd27b0cf73b7085ee..323125aeca41a0da3dac9c1ef70eb35ba44b6497 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jul 18 15:54:54 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       * config/tc-m68k.c (m68k_ip): Use the correct length when
+       allocating space for the unsupported architecture error message.
+
 start-sanitize-d10v
 Thu Jul 18 12:57:10 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
 
index fcd9baff0fcb3e72bba5742867e2e159df911bfa..4e8938c9dc93cd7c69075f3aa754e354ebb65a5c 100644 (file)
@@ -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;
            }