use xstrdup, xmemdup0 and concat more
[deliverable/binutils-gdb.git] / gas / macro.c
index 615bfdae4fdd137a210ed7a8325cffa29f7b16ca..6bfce3180cff7976aae35d586ca18231b9740edc 100644 (file)
@@ -1250,9 +1250,7 @@ check_macro (const char *line, sb *expand,
   if (is_name_ender (*s))
     ++s;
 
-  copy = (char *) xmalloc (s - line + 1);
-  memcpy (copy, line, s - line);
-  copy[s - line] = '\0';
+  copy = xmemdup0 (line, s - line);
   for (cls = copy; *cls != '\0'; cls ++)
     *cls = TOLOWER (*cls);
 
This page took 0.023358 seconds and 4 git commands to generate.