Sat Nov 22 16:06:56 1997 Klaus Kaempf <kkaempf@progis.de>

* evax-emh.c (_bfd_evax_write_emh): Use alloca instead of strdup.
This commit is contained in:
Ian Lance Taylor
1997-11-22 21:08:09 +00:00
parent 107dfe1267
commit f3fb08f6c5
2 changed files with 7 additions and 7 deletions

View File

@@ -1,3 +1,7 @@
Sat Nov 22 16:06:56 1997 Klaus Kaempf <kkaempf@progis.de>
* evax-emh.c (_bfd_evax_write_emh): Use alloca instead of strdup.
Sat Nov 22 12:29:30 1997 Ian Lance Taylor <ian@cygnus.com>
* elf32-sh.c (sh_elf_relax_delete_bytes): Don't kill LABEL

View File

@@ -202,12 +202,9 @@ _bfd_evax_write_emh (abfd)
char *fname, *fout, *fptr;
fname = strdup (bfd_get_filename (abfd));
if (fname == 0)
{
bfd_set_error (bfd_error_no_memory);
return -1;
}
fptr = bfd_get_filename (abfd);
fname = (char *) alloca (strlen (fptr) + 1);
strcpy (fname, fptr);
fout = strrchr (fname, ']');
if (fout == 0)
fout = strchr (fname, ':');
@@ -234,7 +231,6 @@ _bfd_evax_write_emh (abfd)
*fptr = 0;
}
_bfd_evax_output_counted (abfd, fout);
free (fname);
}
else
_bfd_evax_output_counted (abfd, "NONAME");