aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-i960.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-12-01 19:48:10 +0000
committerIan Lance Taylor <ian@airs.com>1995-12-01 19:48:10 +0000
commit58142f101dd3256f4741f60a6b25672d79b91371 (patch)
treee7ca6dd97a327093be2076160bebd1baaf20d8a4 /bfd/coff-i960.c
parent2eec871057c921ceb38fb0b7f3cd78e84b700808 (diff)
downloadgdb-58142f101dd3256f4741f60a6b25672d79b91371.zip
gdb-58142f101dd3256f4741f60a6b25672d79b91371.tar.gz
gdb-58142f101dd3256f4741f60a6b25672d79b91371.tar.bz2
* libbfd.c (bfd_malloc, bfd_realloc): New functions.
(bfd_zmalloc): Return PTR, not char *. Take size_t, not bfd_size_type. * libbfd-in.h (bfd_malloc, bfd_realloc): Declare. (bfd_zmalloc): Change declaration. * libbfd.h: Rebuild. * Many files: Use bfd_malloc and bfd_realloc rather than malloc and realloc. Don't set bfd_error_no_memory if they fail.
Diffstat (limited to 'bfd/coff-i960.c')
-rw-r--r--bfd/coff-i960.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index a67256c..b3bf4e1 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -287,12 +287,9 @@ coff_i960_start_final_link (abfd, info)
if (! info->relocateable)
return true;
- esym = (bfd_byte *) malloc (symesz);
+ esym = (bfd_byte *) bfd_malloc (symesz);
if (esym == NULL)
- {
- bfd_set_error (bfd_error_no_memory);
- return false;
- }
+ return false;
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
return false;