diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-12-01 19:48:10 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-12-01 19:48:10 +0000 |
commit | 58142f101dd3256f4741f60a6b25672d79b91371 (patch) | |
tree | e7ca6dd97a327093be2076160bebd1baaf20d8a4 /bfd/coff-ppc.c | |
parent | 2eec871057c921ceb38fb0b7f3cd78e84b700808 (diff) | |
download | gdb-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-ppc.c')
-rw-r--r-- | bfd/coff-ppc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c index 379ef4e..350cca3 100644 --- a/bfd/coff-ppc.c +++ b/bfd/coff-ppc.c @@ -824,7 +824,9 @@ record_toc(toc_section, our_toc_offset, cat, name) { /* add this entry to our toc addr-offset-name list */ struct list_ele *t; - t = malloc(sizeof(struct list_ele)); + t = bfd_malloc (sizeof (struct list_ele)); + if (t == NULL) + abort (); t->next = 0; t->offset = our_toc_offset; t->name = name; |