Define bfd_realloc(ptr,0) to return allocated memory, whilst bfd_realloc_or_free...
authorNick Clifton <nickc@redhat.com>
Tue, 4 May 2021 13:29:04 +0000 (14:29 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 4 May 2021 13:29:04 +0000 (14:29 +0100)
commitbd6d8601f304d03ecdebe1b1a7d48666845a91aa
tree5880baf07238e954bd33f97c546dbabb3070dc7f
parenta8d6316b67d52eaa1b7b311084ddff71a66f7cc0
Define bfd_realloc(ptr,0) to return allocated memory, whilst bfd_realloc_or_free(ptr,0) frees ptr.

* libbfd.c (bfd_malloc): Provide some documenation.  Treat a size
of 0 as 1.
(bfd_realloc): Likewise.
(bfd_zmalloc): Likewise.
(bfd_realloc_or_free): Provide some documentation.  Treat a size
of 0 as a request to free.
* libbfd-in.h (bfd_realloc): Remove prototype.
(bfd_realloc_or_free): Remove prototype.
(bfd_zmalloc): Remove prototype.
* libbfd.h: Regenerate.
bfd/ChangeLog
bfd/libbfd-in.h
bfd/libbfd.c
bfd/libbfd.h